Filter syntax (Issue Browser & Checks)¶
The Issue Browser and the Checks list share one filter language, modelled on GitHub's search syntax. Everything on this page works in both; the difference is which fields each offers, and the Issue Browser adds several the Checks list has no use for.
Text queries are case insensitive. (Two exceptions are called out below: NOT and architecture
names.)
Text queries¶
| Query | Matches |
|---|---|
hello |
text contains hello |
hello world |
text contains hello and contains world |
"hello world" |
text contains the phrase hello world |
Searching a specific field¶
Use in:<field> to restrict a text query, or a comma-separated list for several. With no field
given, the default is searched.
| Query | Matches |
|---|---|
hello in:checkid |
check ID contains hello |
hello in:checkid,checkname |
check ID or check name contains hello |
The field names differ between the two lists — the same concept, spelled differently. Check which one you are filtering before reaching for a field name.
Issue Browser fields¶
| Field | Searches |
|---|---|
checkid |
the check ID, e.g. RECOMMENDED_01, STI_WARNING |
checkname |
the check name, e.g. "Magic Numbers" |
desc |
the issue description (the violation text). The default when no field is given. |
Checks fields¶
Used by the Checks list when editing a CodeCheck configuration, and by the plugin filters.
| Field | Searches |
|---|---|
id |
the check ID, e.g. RECOMMENDED_01, UND_WARNING |
name |
the check name, e.g. "Magic Numbers" |
description |
the check description |
All fields are searched when none is given.
Negating a filter¶
| Query | Matches |
|---|---|
NOT hello |
text does not contain hello |
NOT hello world |
does not contain hello, does contain world |
hello -in:checkid |
check IDs that do not contain hello |
NOT is case sensitive and applies to the query immediately after it. Negate a field query by
prefixing it with -.
Issue-Browser-only fields¶
Check ID¶
Takes one check ID or a comma-separated list, matched whole rather than as substrings.
| Query | Matches |
|---|---|
checkid:JAVA_11 |
check ID is exactly JAVA_11 |
checkid:JAVA_11,JAVA_12 |
check ID is JAVA_11 or JAVA_12 |
Architecture¶
Matches issues whose location belongs to an architecture — recursively, so sub-architectures count too.
| Query | Matches |
|---|---|
arch:"My Stuff",Team/Mine |
location is in My Stuff or Team/Mine, or below either |
arch:"Directory Structure/src" |
location is in Directory Structure/src or below |
Architecture names are case sensitive, and must be quoted if they contain spaces.
Numeric fields¶
| Operator | Example | Matches |
|---|---|---|
>n |
line:>10 |
greater than 10 |
>=n |
line:>=10 |
10 or more |
<n |
line:<10 |
less than 10 |
<=n |
line:<=10 |
10 or fewer |
n1..n2 |
line:3..7 |
3 to 7 inclusive |
| Field | Searches |
|---|---|
line |
the line number of the issue's location |
hints |
how many fix-it hints the issue has |
notes |
how many notes the issue has |
Time fields¶
srcmodified and filemodified both use the last time the issue's location was modified — not
when the issue itself changed. All the numeric operators above apply.
Dates use ISO 8601 (YYYY-MM-DD, YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ), read from
the file's modification time as the operating system reports it.
| Query | Matches |
|---|---|
srcmodified:>2022-01-01 |
issues in files last modified after 1 January 2022 |
srcmodified:2022-02-01..2022-02-28 |
issues in files modified during February 2022 |
If the project is associated with a git repository, the argument can instead be a commit hash, a
hash prefix, a branch name, a tag, or uncommitted.
| Query | Matches |
|---|---|
srcmodified:>v2.6.3 |
lines changed after tag v2.6.3 |
srcmodified:5cd66cd8 |
lines changed in the commit starting 5cd66cd8 |
srcmodified:uncommitted |
lines with uncommitted changes |
.. is not git's range
With git arguments, a..b matches lines changed on or after a but not after b — unlike
git's own a..b, which selects the commits between them.
The two fields differ in granularity: srcmodified is line-specific for git arguments, so
srcmodified:uncommitted shows only violations on changed lines, while filemodified:uncommitted
shows every violation in any file with uncommitted changes. For date arguments the two behave
identically.