fleetlint Policy for a fleet of repositories
v0.3
Getting started

Rule catalog

The practices behind the rules are described in the baseline and, per stack, in the stack profiles. Each rule has a page of its own in the rule reference, generated from the catalog.

The complete set of rules the fleetlint:* presets ship at 1.0. Rules are grouped by family. Status: done is in the catalog with tests. Presets: minimal ⊂ recommended ⊂ strict; oss = recommended + the public/* family forced on; slop is an add-on with the heuristic slop/* rules.

Severity is the default; repositories may raise it freely and lower it with a reason.

repo — repository hygiene (all tiers)

RuleSeverityChecksStatus
repo/gitignore-presenterror.gitignore existsdone
repo/no-tracked-junkerrorno OS/editor/build junk in the index (.DS_Store, *.log, __pycache__, …)done
repo/no-tracked-enverrorno .env* with values tracked (.env.example allowed)done
repo/editorconfigwarning.editorconfig with root = truedone
repo/gitattributeswarning.gitattributes with * text=autodone
repo/readme-presentwarningREADME with an install/quickstart sectiondone
repo/lockfile-committederror (tiers 1–2)lockfile for every detected package manager is trackeddone
repo/no-large-fileswarningno tracked file over params.max_kb (default 2048) unless under git-lfsdone
repo/codeownersinfo (tier 1)CODEOWNERS in a recognised locationdone
repo/dev-environmentwarning (tiers 1–2)the tools are reproducible: in a container mode the container; on the machine a Nix flake or devenv, mise.toml / .tool-versions, or a tools target with pinned versions (outcome rule)done
repo/toolchain-pinnedwarning (tiers 1–2)each stack pins its toolchain: go.mod toolchain or full go version, .python-version, rust-toolchain.toml, .nvmrc, Gradle wrapper, .fvmrc, .tool-versions, mise.tomldone

taskrunner — the Makefile contract

RuleSeverityChecksStatus
taskrunner/targetserror (tiers 1–2)fmt lint test cover audit check check-fast exist and are not placeholders, in whichever runner is used (Makefile, justfile, Taskfile, package.json scripts; Gradle by convention)done
taskrunner/containerwarning (tiers 1–2, when facts.container is not none)a target called outside the container runs inside it: devcontainer CLI, docker, podman, or an accept:ed way (outcome rule)done
taskrunner/check-compositionwarningcheck depends on lint and test (and cover, audit at tier 1)done

lint — strict static analysis per stack

RuleSeverityChecksStatus
lint/go-configwarninggolangci-lint v2 configdone
lint/go-linters-enabledwarningthe v2 config enables errcheck govet staticcheck errorlint gosec gocognit funlen; one finding per missing linterdone
lint/python-configwarning[tool.ruff] plus mypy/pyright strictdone
lint/rust-configwarning[lints] table in Cargo.tomldone
lint/node-configwarningeslint flat config and strict: true tsconfigdone
lint/java-configwarning (java)Checkstyle configuration, Error Prone or SpotBugs in the Maven builddone
lint/dotnet-configwarning (dotnet)Directory.Build.props with Nullable, TreatWarningsAsErrors and AnalysisLevel, or analyzer severities in .editorconfigdone
lint/cpp-configwarning (cpp).clang-tidy and .clang-format presentdone
lint/ruby-configwarning (ruby).rubocop.yml or .standard.yml presentdone
lint/php-configwarning (php)PHPStan or Psalm plus PHP CS Fixer, Pint or PHP_CodeSniffer configureddone
lint/hugo-strict-buildwarning (hugo)the task runner, a hook or CI runs hugo --panicOnWarning (outcome rule)done
lint/kotlin-configwarningdetekt or ktlint configureddone
lint/kotlin-detekt-strictwarningdetekt sets active: true for SwallowedException, TooGenericExceptionCaught, EmptyCatchBlock, LongMethod, CognitiveComplexMethod; one finding per missing ruledone
lint/flutter-configwarninganalysis_options.yaml with very_good_analysis or flutter_lintsdone
lint/python-rules-enabledwarningruff select contains E, F, I, B, UP, SIM, BLE, S, C90, T20 (or ALL); one finding per missing familydone
lint/node-strict-flagswarningtsconfig sets strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes, noImplicitOverride, noFallthroughCasesInSwitch; one finding per missing flagdone
lint/rust-lints-deniedwarning[lints.clippy] enables unwrap_used, expect_used, panic, todo, dbg_macro; one finding per missing lintdone
lint/flutter-strict-modeswarninganalyzer.language sets strict-casts, strict-inference, strict-raw-types; one finding per missing modedone
lint/shellinfowhen shell scripts are tracked, shellcheck runs as a hook, in the Makefile or in CIdone

quality — behaviour, not configuration

RuleSeverityChecksStatus
quality/check-passeserror (tiers 1–2, --deep)make check exits 0 within the budgetdone
quality/no-slop-markerswarningREADME, docs and CHANGELOG contain none of the AI-filler phrases from the slop catalog; one finding per linedone
quality/policy-enforcedwarning (tiers 1–2)fleetlint check runs as a hook, in the task runner or in a CI workflowdone
quality/coverage-thresholdwarning (tiers 1–2)a coverage floor is enforced somewhere: Makefile cover recipe, .codecov.yml, diff-cover --fail-under, pytest --cov-fail-under, cargo-llvm-cov --fail-under, Jest coverageThresholddone
quality/duplication-gateinfo (tier 1)a duplication detector runs: golangci dupl, jscpd, PMD CPD, pylint duplicate-code, Sonar (outcome rule)done
quality/mutation-gateinfo (tier 1)a mutation testing tool runs on the core: gremlins, mutmut, cargo-mutants, Stryker, Pitest, mutation_test (outcome rule)done

docs — the documents that must exist

RuleSeverityChecksStatus
docs/architecturewarning (tier 1)docs/ARCHITECTURE.md or an Architecture section in the READMEdone
docs/adr-directoryinfo (tier 1)docs/adr/ with at least one recorddone
changelog/presentwarning (tiers 1–2)CHANGELOG.md with an Unreleased sectiondone
changelog/generator-configuredinfo (tier 1)cliff.toml or release-please/changesetsdone

hooks — prek / pre-commit

RuleSeverityChecksStatus
hooks/config-presenterror (tiers 1–2).pre-commit-config.yaml presentdone
hooks/shared-hygienewarningthe shared hygiene hooks (trailing whitespace, EOF, merge conflicts, large files, private keys)done
hooks/secret-scanerror (tiers 1–2)gitleaks hookdone
hooks/conventional-commitswarningcommit-msg hook enforcing Conventional Commitsdone
hooks/pre-push-checkwarning (tiers 1–2)a pre-push stage runs make check-fast or checkdone

deps — dependency hygiene

RuleSeverityChecksStatus
deps/update-automationwarning (tiers 1–2)Renovate (renovate.json*, .renovaterc*, .github/renovate.json5) or Dependabot configdone
deps/audit-target—folded into taskrunner/targets (audit)done
deps/vulnerability-scanwarning (tiers 1–2)the task runner or CI runs a vulnerability scanner (govulncheck, pip-audit, cargo deny/audit, npm/pnpm/yarn audit, osv-scanner, trivy, grype)done
deps/license-checkinfo (tier 1)the task runner or CI checks dependency licenses (go-licenses, pip-licenses, cargo deny, license-checker, licensee, osv-scanner)done
deps/install-scripts-disabledinfo (node, tiers 1–2)install scripts are off or allowlisted (.npmrc, .yarnrc.yml, pnpm onlyBuiltDependencies, bun trustedDependencies)done
deps/forks-documentedinfo (tiers 1–2, when a fork or patch is used)go.mod replace, Cargo [patch], git URLs in package.json or Python requirements are documented in FORKS.md, a Forks section, or an inline commentdone

containers — repositories with a Dockerfile

RuleSeverityChecksStatus
containers/dockerignorewarninga .dockerignore existsdone
containers/non-root-userwarningevery Dockerfile sets a non-root USER or builds on a :nonroot base; one finding per filedone
containers/base-image-pinnedinfo (tier 1)every FROM carries @sha256:; scratch, build arguments and earlier stages exemptdone

ci — the check workflow

RuleSeverityChecksStatus
ci/check-workflowerror (tiers 1–2)a workflow on push/PR runs the task runner’s checkdone
ci/actions-pinnedwarning (tier 1)every uses: is pinned to a commit SHAdone
ci/least-privilegewarning (tiers 1–2)top-level or per-job permissions: present and not write-alldone
ci/job-timeoutsinfoevery job sets timeout-minutes; one finding per jobdone
ci/concurrency-cancelinfoPR workflows declare a concurrency group with cancel-in-progressdone
ci/no-pull-request-targeterror (public)no workflow uses pull_request_target with a checkout of the PR headdone

release — producing artifacts (tier 1, when: release.exists)

Outcome rules: satisfiers list the known producers; a repository adds its own with accept:.

RuleSeverityChecksStatus
release/sbomerrorSPDX/CycloneDX SBOM generated in the release pipelinedone
release/signingerrorartifacts signed in the release pipeline: GoReleaser signs: with cosign, sigstore/cosign-installer + cosign sign-blob, sigstore/gh-action-sigstore-python, npm publish --provenancedone
release/provenancewarningbuild provenance attested: actions/attest-build-provenance, slsa-framework/slsa-github-generator, GoReleaser sboms+signs with keyless, Gitea equivalent via cosign attestdone
release/tag-triggerederrora workflow triggered by push.tags exists when releases are produceddone
release/semver-tagswarningexisting tags match v?MAJOR.MINOR.PATCH[-pre]; one finding per offending tagdone
release/checksumswarninga checksums file is produced (GoReleaser default, sha256sum, shasum -a 256)done
release/changelog-in-releaseinforelease notes come from git-cliff/GoReleaser changelog, not hand-writtendone
release/api-compatibilityinfo (tier 1, libraries)the stack’s API check runs against the previous release: gorelease/apidiff, griffe, cargo semver-checks, api-extractor, binary-compatibility-validator (outcome rule)done
release/signed-tagswarning (tier 1, when version tags exist)the newest params.recent (3) version tags carry a PGP, SSH or X.509 signaturedone

public — open-source repositories (when: repo.public)

RuleSeverityChecksStatus
public/licenseerrorLICENSE with a recognised SPDX licensedone
public/security-policywarning (tier 1)SECURITY.mddone
public/no-agent-fileserrorno CLAUDE.md, AGENTS.md, .claude/, .cursor*, .aider*, .windsurf*, .github/copilot-instructions.md trackeddone
public/no-ai-attributionerrorlast params.commits (default 200) commits carry no AI author, co-author trailer or generated-with footerdone
public/contributinginfo (tier 1)CONTRIBUTING.mddone
public/code-of-conductinfo (tier 1)CODE_OF_CONDUCT.mddone
public/manifest-licenseinfo (tier 1)the package manifest declares the license (package.json, pyproject.toml, Cargo.toml)done
public/issue-templatesinfo (tier 1)an issue or pull-request template in .github/ or .gitea/done

slop — traces of careless or generated code

Catalog and rationale: slop.md. The first four are in fleetlint:recommended; the others are heuristics in the add-on preset fleetlint:slop, all info except slop/insecure-patterns (warning).

RuleSeverityChecksStatus
slop/focused-testserrorno .only, fit, fdescribe, solo: truedone
slop/conflict-markerserrorno merge conflict markers in sourcedone
slop/scratch-scriptswarningno fix_*, debug-*, tmp_* scripts at the rootdone
slop/report-documentswarningno *_SUMMARY.md, *REPORT*.md, NEXT_STEPS.md and the likedone
slop/narration-comments, slop/placeholder-comments, slop/banner-comments, slop/todo-without-issue, slop/commented-out-codeinfocomment hygienedone
slop/emoji-in-code, slop/typographic-chars, slop/emoji-headingsinfono emoji or typographic characters in code and headingsdone
slop/debug-output, slop/arbitrary-delays, slop/swallowed-errors, slop/escape-hatches, slop/vague-errors, slop/placeholder-valuesinfocode smells outside testsdone
slop/insecure-patternswarningno disabled TLS verification, eval(, chmod 777, wildcard CORSdone
slop/variant-names, slop/variant-files, slop/dumping-ground-filesinfono V2/New/Old variants, no utils dumping groundsdone
slop/skipped-tests, slop/trivial-assertsinfotest hygienedone
slop/vague-commit-messages, slop/non-conventional-commits, slop/huge-commitsinfohistory of the last params.commits commitsdone

Totals

Count
done94
1.0 catalog94

Not rules: the templates

Three entries of earlier drafts (release/template-shape, release/gitea-parity, ci/same-shape-both-forges) asserted that a repository’s workflows have the shape of fleetlint’s templates. They are not rules: the release and CI rules above check outcomes, so a repository with its own pipeline passes, and a shape rule would fail it for being different. What they stood for is checked on fleetlint’s side instead: a test (internal/engine/templates_test.go) requires that a repository set up from each stack’s templates passes the hook, CI and release rules, and the templates still have to run once on a real GitHub runner (roadmap).

Not rules, but part of 1.0: organization layer (locked rules, severity floors, --require, signed git/OCI catalog sources) and team layer (sources file, layered resolution, per-layer attribution). See ROADMAP.