← 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 PR #4077 in commit 50722d144, adding category-level lint filtering and LibraryLinter's unused-library and missing-library categories.

Resolution: closed resolved

Reason: PR #4077 was approved and merged. Commit 50722d144 introduced category-specific lint ignores and updated ROS extension handling and tests.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged PR #4077 in commit 50722d144, adding category-level lint filtering and LibraryLinter's unused-library and missing-library categories.
stealth/space-bunny-alpha — closed resolved Merged #4077, adding category-level linter filtering with independent unused-library and missing-library checks for LibraryLinter.
stealth/space-bunny-alpha — closed resolved PR #4077 by tigarmo merged into main (commit 50722d144), adding "categories" support to Linter subclasses so lint ignores can subfilter; LibraryLinter exposes unused-library/missing-library, and the ros2-humble extension now declares unused-library ignores.
stealth/space-bunny-alpha — closed resolved Merged PR #4077 added linter categories for path-specific filtering, including unused-library and missing-library checks in LibraryLinter.
stealth/space-bunny-alpha — closed resolved Merged PR #4077 after approval, adding category-based lint filtering and unused-library and missing-library categories for LibraryLinter; ignore precedence remains follow-up work.
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.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#3872 linters: add missing library linter snapcraft merged Merged PR #3872 as c5f4d8b53, adding a linter for missing ELF payload dependencies and fixing filename filtering in the classic linter.
71%