Skip to content

Standards Documentation

This section contains coding standards, style guides, and best practices for contributing to the Fawkes platform.

Coding Standards

Pre-commit Hooks

Documentation Standards

  • Standardization Summary - Documentation standardization approach

Quality Assurance

Linting

Run all linters before committing:

make lint

Individual linters:

  • Bash: shellcheck
  • Python: flake8, black, isort
  • Go: golangci-lint
  • YAML: yamllint
  • Markdown: markdownlint
  • Terraform: terraform fmt, tflint

Pre-commit Setup

# One-time setup
make pre-commit-setup

# Manual run
pre-commit run --all-files

CI/CD Quality Gates

All pull requests must pass:

  • ✅ Automated linting
  • ✅ Security scanning
  • ✅ Unit tests
  • ✅ Pre-commit hooks
  • ✅ Code review

Style Guides

Markdown

Follow markdownlint rules for consistent documentation:

  • Use ATX-style headings (#)
  • Use fenced code blocks with language tags
  • Limit line length (when reasonable)
  • Use proper list formatting

Python

  • Follow PEP 8 style guide
  • Use type hints
  • Write docstrings in Google style
  • Use black for formatting

Go

  • Follow Effective Go
  • Use gofmt and golangci-lint
  • Write tests for all public functions

Bash