Standards

Per-language tooling standards for Python, Bash, Terraform, Ansible, Ruby, Go, JavaScript/TypeScript, Rust, Swift, Kotlin, 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.

ConcernPythonBashTerraformAnsibleRubyGoJavaScriptRustSwiftKotlin
Linterruffshellchecktflintansible-lintrubocop, reekgolangci-linteslintclippySwiftLintktlint, detekt
Formatterruff formatshfmtterraform fmt, terragrunt hclfmtrubocopgofumptprettierrustfmtswift-formatktlint
Securitybandit, semgreptfsec, checkovbrakeman, bundler-auditgovulnchecknpm auditcargo-audit, cargo-denyOWASP dependency-check
Testspytestbatsterratestmoleculerspecgo testvitestcargo testswift testgradle test
Type Checkmypysorbettsc
Docsterraform-docs
Universaltrivy, gitleaks, git-clifftrivy, gitleaks, git-clifftrivy, gitleaks, git-clifftrivy, gitleaks, git-clifftrivy, gitleaks, git-clifftrivy, gitleaks, git-clifftrivy, gitleaks, git-clifftrivy, gitleaks, git-clifftrivy, gitleaks, git-clifftrivy, 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:

TargetWhat It Runs
make lintruff check, shellcheck, tflint, ansible-lint, mypy, rubocop, reek, golangci-lint, eslint, tsc, clippy, SwiftLint, ktlint, detekt
make formatruff format –check, shfmt -d, terraform fmt -check, terragrunt hclfmt –terragrunt-check, rubocop –check, gofumpt -d, prettier –check, cargo fmt –check, swift-format lint, ktlint –format –dry-run
make fixruff format, shfmt -w, terraform fmt, terragrunt hclfmt, rubocop -a, gofumpt -w, prettier –write, cargo fmt, swift-format format, ktlint –format
make testpytest, bats, terratest, molecule, rspec, go test, vitest, cargo test, swift test, gradle test
make securitybandit, semgrep, tfsec, checkov, brakeman, bundler-audit, govulncheck, npm audit, cargo-audit, cargo-deny, OWASP dependency-check
make scantrivy, gitleaks (universal – all projects)
make docsterraform-docs
make changeloggit-cliff (generate CHANGELOG.md from conventional commits)
make checkAll 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

Coding Practices

Cross-cutting coding and git practices for all DevRail projects.

Python Standards

Python tooling standards: ruff, bandit, semgrep, pytest, and mypy.

Bash Standards

Bash tooling standards: shellcheck, shfmt, and bats.

Ruby

Ruby and Rails tooling standards: rubocop, brakeman, bundler-audit, rspec, reek, and sorbet.

Go

Go tooling standards: golangci-lint, gofumpt, govulncheck, and go test.

Terraform Standards

Terraform tooling standards: tflint, terraform fmt, terragrunt hclfmt, tfsec, checkov, terratest, and terraform-docs.

JavaScript

JavaScript/TypeScript tooling standards: ESLint, Prettier, npm audit, Vitest, and tsc.

Rust

Rust tooling standards: clippy, rustfmt, cargo-audit, cargo-deny, and cargo test.

Ansible Standards

Ansible tooling standards: ansible-lint and molecule.

Swift

Swift tooling standards: SwiftLint, swift-format, swift test, and xcodebuild.

Kotlin

Kotlin tooling standards: ktlint, detekt, Gradle, and Android Lint.

Universal Security

Universal tools that run for every project: trivy, gitleaks, and git-cliff.

Kubernetes

Kubernetes tooling standards: kustomize and kubeconform for manifest validation.