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: 50auto_install
auto_install: trueProvisions 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 key | Turns off |
|---|---|
version_control | The working-tree worklog |
build | The compile check |
lint | The linter |
dependencies | The dependency check |
runtime | The runtime-version check |
docs | The doc-coverage check |
tests | The test run |
benchmarks | The benchmark run |
secrets | The secret scan |
vulnerabilities | The vulnerability scan |
Options are read by a few checks. All option values are strings.
| Config key | Option | Meaning |
|---|---|---|
docs | min | Minimum doc-coverage percentage before the check warns, for example "80" |
sec.secrets | history | "true" also scans git history, not only the working tree |
sec.vuln | db | Vulnerability 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: falseThe 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: 3Each profile takes these keys.
| Key | Applies to | Meaning |
|---|---|---|
name | both | Label for the result row |
race | tests | Run with -race |
coverage | tests | Collect coverage |
tags | both | Build tags, -tags |
benchtime | benchmarks | -benchtime |
count | both | -count |
cpu | both | -cpu |
args | both | Raw 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: 72weights 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.