New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't setup query-filters: exclude by query id #16106
Comments
Hi @bouillon 👋 The issue you linked to discusses how to filter out queries when running CodeQL in a GitHub Actions workflow. For usage with the CLI, you can put together a custom query suite. There is an example of what such a file would look like to filter out some queries from an existing suite. |
Thanks.
I would expect this a call like codeql database analyze /tmp/codeql_db/ codeqlfilter.qls --format csv --output /tmp/codeql-report.csv --download --threads=12 produce me the same result as without codeqlfilter.qls but a get much less results (only errors) all recommendations, like missing doc-string are missing.
Also i wondering if the file has content
It seem codeql not found all queries for python as by default? |
@bouillon you could try to change
to
to include all Python queries, not just the default ones. |
Thanks this include all queries but i get an exception and the output file is not generated.
I found this but how to configure it #13839 How to configure and include only compatible queries? |
Ok my config
Any comments are wellcome |
This seems like unintended behaviour on our end and I have passed this on to our Python team to have a look to see if there's a Python-specific issue which triggers this error here. In the meantime, you could try to explicitly exclude
Let me know if that works for you. |
Thank you for support |
I am new to CodeQL and have successfully run analyses on our Python codebase locally using the full set of Python queries like this:
codeql database analyze /tmp/codeql_db codeql/python-queries --format csv --output /tmp/codeql-report.csv --download
I would like to exclude certain queries and found the query-filters option:
The documentation for this is found in this issue: #7937
However, I'm unsure about where or how to apply the configuration file. The codeql database analyze --help command doesn't accept a configuration file parameter.
I've tried adding this configuration to .github/workflows/codeql-analysis.yml, but it didn't work.
Could you show me what the content of the configuration file should look like and what its name should be?
The text was updated successfully, but these errors were encountered: