Build tracing filtering: path-based inclusion & content-based exclusion
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 38/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Bereich
- build-system, tooling
Rechercherichtung
Beginne mit dem CodeQL CLI-Ablauf database trace-command und der vorhandenen Extractor-Option exclude, und verfolge anschließend, wie Eingaben der Java- und Kotlin-Compiler an die Extraktion übergeben werden. Die Anfrage hat zwei getrennte Ziele: pfadbasierte Einbeziehung und inhaltsbasierten Ausschluss. Als erledigt gilt sie, wenn beide Filterverhalten definiert und implementiert sind und ihre Befehlszeilenkonfiguration sowie die unterstützten Matching-Semantiken dokumentiert sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
I'm using the CodeQL CLI with a large Java/Kotlin project that makes heavy use of autogenerated source during the build process. Because of this, I am using build tracing (codeql database trace-command) to extract CodeQL databases.
Is there any way to filter the files processed by the extractor in the following ways? If not, please consider this a feature request :)
Include-filtering by path
I'd like to be able to extract databases for certain components of the project. Due to the complexity of the project's build system, it's not easy to just build/trace only those components of the project; instead it would be much easier if I could just restrict extraction to those components' files by providing path globs during build tracing.
I'm aware that files can be excluded using the exclude extractor option, but this only allows certain path globs to be excluded, not included.
Exclude-filtering by file contents
As mentioned earlier, the project has a lot of autogenerated code, some (but only some) of which needs to be ignored. This code is often generated with paths that are not easily excludable using the existing path-glob-based exclusions. It would be great if I can specify regexes to search for in the content of files that indicate that the file should not be extracted (e.g. to look for things like "// Autogenerated file, do not edit", etc.)
If there isn't a way to do these, I'm happy to hear about hacky workarounds. For example, the commands I trace are already wrapped in shell scripts that wrap the underlying compilers (javac etc.) in order to provide for more filtering criteria than mentioned here. However, it's hard to do the above properly using such a wrapper because of i.e. the need to properly parse the original compiler command line arguments, handle things like files in JAR files, indirect command line options, etc. The extractor is much better placed to handle such filtering.
- Vorherrschende Sprache
- CodeQL
- Sterne
- 10.1k
- Forks
- 2.1k
- Ø Merge
- 2 T. 16 Std.
- Gemergte PRs (30 T.)
- 143
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/codeql
-
agentic-workflows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
false-positive javascript
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
-
C#: cs/simplifiable-boolean-expression false positive on Nullable<bool> compared with a literal Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
false-positive
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
elastic/gradle-plugins#157 ·
-
Documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
cake-build/cake#5024 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
web-infra-dev/rspack#15847 ·
-
accepted bug wg/developer-experience-ecosystem
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
vllm-project/semantic-router#4062 · 2 Kommentare ·