DocsCareConfigurationConfig file

Config file

Every care.yml key, covering auto-install, per-check options, tool pins, run profiles, and the health grade.

care.yml is fully optional. Every key has a working default, so a file sets only what it changes. care reads ~/.care/care.yml first and ./care.yml second, and the repo file wins on any overlapping key.

A complete file with every top-level key looks like this.

auto_install: true

checks:
  docs:
    options:
      min: "80"
  sec.secrets:
    options:
      history: "true"
  sec.vuln:
    options:
      db: "https://vuln.go.dev"
  benchmarks:
    disabled: true

tools:
  golangci-lint:
    version: "1.60.0"
  betterleaks:
    disabled: true

profiles:
  tests:
    - name: race
      race: true
      coverage: true
    - name: integration
      tags: "integration"

health:
  weights:
    docs: 10
  caps:
    vulnerabilities: 50

auto_install

auto_install: true

Provisions any missing tool binary on demand through brew or go install. Defaults to true. Set it to false to require every tool to be pre-installed, which is the usual choice for a locked-down CI image.

checks

A map keyed by a check's config key. Each entry carries a free-form options bag and a disabled switch. The config keys are not always the feature name, so use the ones below.

checks:
  <key>:
    disabled: false
    options:
      <name>: "<value>"

disabled: true removes a check from a run even when it would otherwise be selected. Everything runs by default, so this is how you turn a check off without disabling the tool behind it, which other checks may share. Disabling is keyed by the feature name.

Feature keyTurns off
version_controlThe working-tree worklog
buildThe compile check
lintThe linter
dependenciesThe dependency check
runtimeThe runtime-version check
docsThe doc-coverage check
testsThe test run
benchmarksThe benchmark run
secretsThe secret scan
vulnerabilitiesThe vulnerability scan

Options are read by a few checks. All option values are strings.

Config keyOptionMeaning
docsminMinimum doc-coverage percentage before the check warns, for example "80"
sec.secretshistory"true" also scans git history, not only the working tree
sec.vulndbVulnerability database URL passed to govulncheck

tools

Overrides tool binaries by name. Pin a version or disable a tool. Install coordinates such as the brew formula and go import path live in code, not config.

tools:
  golangci-lint:
    version: "1.60.0"
  govulncheck:
    disabled: false

The tool names care recognizes are golangci-lint, betterleaks, and govulncheck. Disabling a tool turns off the checks that depend on it.

profiles

Run profiles for the two profiled features, tests and benchmarks. A feature with N profiles runs N times, each producing its own result row. An empty list keeps the synthesized default profile.

profiles:
  tests:
    - name: race
      race: true
      coverage: true
    - name: integration
      tags: "integration"
  bench:
    - name: default
      benchtime: "2s"
      count: 3

Each profile takes these keys.

KeyApplies toMeaning
namebothLabel for the result row
racetestsRun with -race
coveragetestsCollect coverage
tagsbothBuild tags, -tags
benchtimebenchmarks-benchtime
countboth-count
cpuboth-cpu
argsbothRaw escape-hatch flags appended to the invocation

health

Tunes the repo health grade. It overlays the active ecosystem's defaults, so you set only the keys you want to change and the rest keep care's published Go weights and caps. See Grading for the default values and the tradeoffs.

health:
  weights:
    version_control: 5
    build: 20
    lint: 20
    dependencies: 8
    docs: 5
    tests: 15
    benchmarks: 0
    secrets: 20
    vulnerabilities: 20
  caps:
    secrets: 40
    vulnerabilities: 72

weights set each check's importance in the score. A weight of 0 makes a check informational. caps set the worst score a failing critical check leaves standing. Only secrets and vulnerabilities take a cap.