Files
golangci-lint will run on files with the following extensions:.gogo.mod
Configuration
golangci-lint supports the following config files:- User-defined config file set at
reviews.tools.golangci-lint.config_filein your projectās.coderabbit.yamlfile or setting the āReview ā Tools ā golangci-lint ā Config Fileā field in CodeRabbitās settings page. .golangci.yml.golangci.yaml.golangci.toml.golangci.json
What CodeRabbit runs
We run golangci-lint in a sandbox with--out-format=json and per-module scoping. No plugins or external binaries are loaded.
Security policy and restrictions
- Plugins are disallowed. If plugins are referenced in config, we skip.
- Advanced or unsafe options cause a skip: top-level plugins, non-empty
linters-settingsthat imply external executors, or preset bundles that expand to plugins. - Config version is validated; an āunsafeā evaluation returns version
0and we fail-closed. - Blocked configurations include:
- Any
pluginsentries (in any form) - Non-empty
linters-settingsvalues that imply external executors - Presets that expand to plugins
- Any
When we skip golangci-lint
CodeRabbit will skip running golangci-lint when:- The config references plugins (in any form).
- The config contains advanced or unsafe options we canāt guarantee are safe.
- The config cannot be parsed confidently (YAML/JSON/TOML errors).