2 Commits
Author SHA1 Message Date
Gleb Chesnokov 1c455d4785 scripts: Validate analyzer diff bases as single commits
Passing the base directly to git diff allows an option such as --quiet to
be interpreted as a flag. On a clean worktree it can succeed without
selecting any sources, instead of rejecting the invalid revision.

Resolve the base with rev-parse --verify --end-of-options and require a
commit before building the diff command. Reuse the resulting object ID so
options, ranges, tree objects and unknown revisions cannot turn an invalid
request into an empty selection.

Add a fixture covering rejected bases on a clean tree and a valid tag
before and after a source change. Expose the resolver for future patch
consumers as well.
2026-10-19 19:18:14 +03:00
Gleb Chesnokov fce9b872b0 scripts: Define shared analyzer source selection
Give the upcoming analyzer drivers one source-selection policy for full,
working-tree diff and explicit-file checks. Include product C sources and
headers, including KUnit, and keep both lexical and resolved paths within
the allowed directories.

Select only the newer QLogic SCST target directory. Exclude the legacy
QLogic tree, the upstream part of the newer driver, the two conftest trees
and generated .mod.c files. Document these input exclusions separately
from diagnostic filtering, which this helper does not perform.

Add temporary-repository fixtures and a make lint-test entry point. Keep
the existing checkpatch and kernel regression consumers unchanged until
their replacement drivers are introduced.
2026-10-19 19:18:14 +03:00