Skip to content

IECQ005: suppression_syntax

Every suppression marker is one the linter reads.

Category: code_quality ยท Applies to: eval, helper

What it does

Reads the # inspect-evals-lint: ignore[...] comments in the package's Python files and Dockerfiles (excluded files are skipped) and warns about each marker that suppresses nothing: a comment in the removed # noautolint syntax or a .noautolint file, an ignore or ignore-file without a bracketed rule list, an ignore-file past the first ten lines, and a selector that names no rule. One warning per marker, at its line. The other selectors in the same comment still apply.

Why is this bad?

A marker the linter does not read does nothing, silently: the finding it was meant to cover is reported under its own rule while the reader of the code believes it is handled. Earlier releases stopped with a configuration error instead, which lost every other result for the package, so a repository linted by a third party (the register lint service) had no results at all until it migrated.

Example

from inspect_ai.model._model import thing  # noautolint: private_api_imports

Use instead:

from inspect_ai.model._model import thing  # inspect-evals-lint: ignore[private_api_imports]

Suppress on a line with # inspect-evals-lint: ignore[IECQ005] or ignore[suppression_syntax]; select or ignore it in configuration by either, or by the prefix IECQ.