Skip to main content
Glama
development-guidelines.md1.98 kB
# Development Guidelines ## Security and Code Quality Standards ### CRITICAL SECURITY RULES 1. **NEVER use mock frameworks or mock code:** - FORBIDDEN: `mockall`, `mock` libraries, or any mock implementations - FORBIDDEN: Mock structs, mock functions, or fake implementations - ALLOWED: Real integration tests with temporary files/directories - ALLOWED: Testing with actual data structures and real implementations **Reason**: Mock code can mask security vulnerabilities and create false confidence in tests. 2. **Remove ALL unused code immediately:** - FORBIDDEN: Dead code, unused functions, unused structs, unused imports - FORBIDDEN: Commented-out code blocks - FORBIDDEN: `#[allow(dead_code)]` except for very specific cases - REQUIRED: Clean, minimal codebase with only actively used code - REQUIRED: Remove unused dependencies from Cargo.toml 3. **Code quality enforcement:** - FORBIDDEN: Any warnings in CI (`RUSTFLAGS="-Dwarnings"`) - FORBIDDEN: Unused variables, unused imports, unused functions - REQUIRED: Prefix test variables with `_` if intentionally unused - REQUIRED: Use `#[allow(dead_code)]` only for legitimate infrastructure code ## Code Style - Follow `rustfmt` formatting (run `cargo fmt --all` before commits) - Maximum line length: 100 characters - Use `Result`/`Option` types appropriately - Document public APIs with rustdoc comments - Prefer immutable variables when possible ## Error Handling - Use `anyhow` for application-level error propagation - Use `thiserror` for custom error types - Propagate errors with `?` operator - Avoid `.unwrap()` in production code ## Testing Strategy - Unit tests for individual modules - Integration tests for Terraform service operations - Registry API integration tests with real API calls (limited by timeouts) - Performance tests for batch operations and caching - Use `tempfile` for file system tests - **NO MOCK FRAMEWORKS** - Use real implementations only

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nwiizo/tfmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server