← Back to issue list

linters: allow "categories" for subfiltering

View original Github issue

Metadata

Project
snapcraft
Number
#4077
Type
pull request
State
merged
Author
tigarmo
Labels
Created
Updated
Closed

Current evaluation

Merged. Adds linter categories for finer-grained filtering, supporting unused-library and missing-library checks in LibraryLinter. Deferred user versus extension lint ignore override handling to a separate task.

Suggested action:

No scores available.

Issue body

This commit adds the notion of "categories" for Linter subclasses. For linters that perform multiple different "types" of linting, this lets the author ignore specific paths for specific types of linting issues, with a finer granularity than ignoring the whole linter wholesale. Currently the only Linter type that supports this is the LibraryLinter, which provides the "unused-library" and "missing-library" categories to disable checking for unused or missing libraries. CRAFT-1642 - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint`? - [ ] Have you successfully run `pytest tests/unit`? ----- First commit has the general linter changes, second commit has the update of the ros extension.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Adds linter categories for finer-grained filtering, supporting unused-library and missing-library checks in LibraryLinter. Deferred user versus extension lint ignore override handling to a separate task.
qwen3.6-35b-a3b-mtp-q6 Merged to main. Adds linter categories for finer-grained path filtering, initially supporting LibraryLinter checks. Includes spread tests. Notes a separate edge case where user ignores override extension defaults, to be addressed later.
qwen3.6-35b-a3b-mtp-q6 Merged. Introduces linter categories for finer-grained rule filtering, initially for LibraryLinter. Includes general linter and ROS extension updates. Slight coverage decrease noted. Follow-up task created to fix user-provided lint ignore override behavior.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3931 linters: allow ignoring files per-linter snapcraft merged Merged. Restructures lint.ignore to support per-linter file exclusions for finer-grained control. Approved, passed CI with 100% diff coverage, and modified 9 files. Preserves ability to disable entire linters.
74%