New issue
Advanced search Search tips

Issue 837024 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Filter by directories for a particular analyzer (more powerful path filters)

Project Member Reported by juliehockett@google.com, Apr 25 2018

Issue description

Similar to how the PathFilters filter based on extension, it would be nice if we could filter out certain paths (e.g. any code under third_party/ shouldn't be analyzed for our copyrights).

 
Labels: Pri-2 Type-Feature
Status: Available (was: Unconfirmed)
Summary: Filter by directories for a particular analyzer (more powerful path filters) (was: Filter by directories for a particular analyzer)
Good point... in this case, what we would want would also be some kind of a blacklist filter. And maybe a regular expression is better than a glob expression.

Having just match (whitelist) glob expressions doesn't seem to be as expressive as we want. Of course, it's always possible for individual analyzers to filter however they want when enumerating through files, but maybe they shouldn't have to.

Maybe in the analyzer definition in the config we'd like to have a list of "include" regexps and a list of "exclude" regexps? (If we had that, for example, we could exclude makefiles from spacey by modifying the the config file...)
I'd say it makes more sense for the filtering to happen outside the analyzer (if possible) -- since the service is manipulating the files, it's reasonable to assume that the analyzer should run on every file it receives. That sort of separation would also make it easier to change those filters (only modifying a config file, rather than having to touch the source).

Comment 3 by mar...@chromium.org, Apr 26 2018

I think in the end it'll be a bit of both.

We need at the very least coarse filtering at Tricium level so unneeded tasks are not triggered for no reason.

But this doesn't preclude the analyzers themselves to also ensure they are running on the relevant files. So I wouldn't say that the analyzer always run on every files it receives, but it should receive mostly relevant files.
Components: Infra>Platform>Tricium
Components: -Infra>CodeAnalysis
Labels: -Tricium

Sign in to add a comment