Expand description
A linter for BPF C code.
At the source code level, individual lints can be disabled with source code comments of the form
/* bpflint: disable=probe-read */
bpf_probe_read(/* ... */);In this instance, probe-read is the name of the lint to disable.
Entire blocks can be annotated as well:
/* bpflint: disable=probe-read */
void handler(void) {
void *dst = /* ... */
bpf_probe_read(dst, /* ... */);
}In the above examples, none of the instances of bpf_probe_read
will be flagged.
The directive bpflint: disable=all acts as a catch-all, disabling
reporting of all lints.
Modules§
- terminal
- Functionality for reporting lint matches on a terminal.
Structs§
- Lint
- The representation of a lint.
- Lint
Match - Details about a lint match.
- Lint
Opts - Configuration options for lints.
- Point
- A position in a multi-line text document, in terms of rows and columns.
- Range
- A range of positions in a multi-line text document, both in terms of bytes and of rows and columns.
- Version
- A version in the form of a (major, minor, patch) triple.
Functions§
- builtin_
lints - Retrieve the list of lints shipped with the library.
- lint
- Lint code using the default (built-in) set of lints.
- lint_
custom - Lint code using the provided set of lints.
- lint_
custom_ opts - Lint code using the provided set of lints with custom options.
This function behaves the same as
lint_custom, but allows for additional configuration via aLintOptsobject.