Skip to content

Latest commit

 

History

History
63 lines (50 loc) · 4.06 KB

File metadata and controls

63 lines (50 loc) · 4.06 KB
title Standards
linkTitle Standards
weight 20
description Per-language tooling standards for Python, Bash, Terraform, Ansible, Ruby, Go, JavaScript/TypeScript, Rust, and universal security tools.

DevRail defines opinionated tooling standards for each supported language ecosystem. Every tool is pre-installed in the dev-toolchain container and invoked through consistent Makefile targets.

Language Support Matrix

The following table shows the default tool for each concern per language. These tools are pre-installed in the dev-toolchain container.

Concern Python Bash Terraform Ansible Ruby Go JavaScript Rust
Linter ruff shellcheck tflint ansible-lint rubocop, reek golangci-lint eslint clippy
Formatter ruff format shfmt terraform fmt, terragrunt hclfmt -- rubocop gofumpt prettier rustfmt
Security bandit, semgrep -- tfsec, checkov -- brakeman, bundler-audit govulncheck npm audit cargo-audit, cargo-deny
Tests pytest bats terratest molecule rspec go test vitest cargo test
Type Check mypy -- -- -- sorbet -- tsc --
Docs -- -- terraform-docs -- -- -- -- --
Universal trivy, gitleaks, git-cliff trivy, gitleaks, git-cliff trivy, gitleaks, git-cliff trivy, gitleaks, git-cliff trivy, gitleaks, git-cliff trivy, gitleaks, git-cliff trivy, gitleaks, git-cliff trivy, gitleaks, git-cliff

A -- entry means the concern does not apply to that language. Universal tools run for all projects regardless of declared languages.

Makefile Target Mapping

Each Makefile target runs the relevant tools for all languages declared in .devrail.yml:

Target What It Runs
make lint ruff check, shellcheck, tflint, ansible-lint, mypy, rubocop, reek, golangci-lint, eslint, tsc, clippy
make format ruff format --check, shfmt -d, terraform fmt -check, terragrunt hclfmt --terragrunt-check, rubocop --check, gofumpt -d, prettier --check, cargo fmt --check
make fix ruff format, shfmt -w, terraform fmt, terragrunt hclfmt, rubocop -a, gofumpt -w, prettier --write, cargo fmt
make test pytest, bats, terratest, molecule, rspec, go test, vitest, cargo test
make security bandit, semgrep, tfsec, checkov, brakeman, bundler-audit, govulncheck, npm audit, cargo-audit, cargo-deny
make scan trivy, gitleaks (universal -- all projects)
make docs terraform-docs
make changelog git-cliff (generate CHANGELOG.md from conventional commits)
make check All of the above in sequence

Per-Language Pages

Consistent Page Structure

The Coding Practices page covers cross-cutting standards (principles, error handling, testing, git workflow) that apply to all languages. Each per-language page follows a consistent structure:

  1. Tools -- table of tools with category, name, and purpose
  2. Configuration -- configuration examples with inline comments
  3. Makefile Targets -- which targets invoke which tools
  4. Pre-Commit Hooks -- which hooks run locally vs. CI-only
  5. Notes -- important conventions and gotchas