How to perform static analysis¶
CI enforces static analysis checks for code, configuration, documentation, and more.
Go¶
Go code can be analyzed with the dda inv linter.go
command. This uses golangci-lint which is an aggregator for several linters.
The configuration is defined in the .golangci.yml file. The linters
key defines the list of linters we enable.
Tip
You can ignore linter issues on specific lines of code with the nolint directive.
Python¶
The dda inv linter.python
command performs analysis on Python code. This uses Ruff for linting and formatting, and also (for now) Vulture to find unused code.
Tip
Ruff supports several ways to suppress errors in your code.
Other¶
All analysis tasks are prefixed by linter.
and may be shown by running dda inv --list
.