-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Improve CodeQL exclude rule configuration
- Loading branch information
Showing
1 changed file
with
18 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,35 @@ | ||
# Suppress some CodeQL warnings. | ||
query-filters: | ||
|
||
# Suppress some LGTM warnings. | ||
|
||
# A few occurrences of try/except clauses without naming a specific exception type. | ||
# TODO: May be improved. | ||
# https://codeql.github.com/codeql-query-help/python/py-empty-except/ | ||
- exclude: | ||
id: py/empty-except | ||
|
||
# A module is imported with the "import" and "import from" statements. | ||
# https://lgtm.com/rules/1818040193/ | ||
# CodeQL says "Importing a module twice using the import xxx and from xxx import yyy is confusing.". | ||
# While it has a point, it is still more than acceptable. | ||
# https://codeql.github.com/codeql-query-help/python/py-import-and-import-from/ | ||
- exclude: | ||
id: py/import-and-import-from | ||
|
||
# Quite a few functions don't explicitly return values, but | ||
# instead implicitly return `None`, when falling through. | ||
# TODO: May be improved. | ||
# https://codeql.github.com/codeql-query-help/python/py-mixed-returns/ | ||
- exclude: | ||
id: py/mixed-returns | ||
|
||
# Disable rule to compensate parameter naming in `CrateCompiler._get_crud_params`. | ||
# Using an alternative name for the first parameter of an instance method makes code more difficult to read. | ||
# https://lgtm.com/rules/910082/ | ||
# The parameter naming in `CrateCompiler._get_crud_params` is so that it triggers this admonition. | ||
# However, by using an alternative name for the first parameter of an instance method, it would | ||
# make the code harder to read. | ||
# https://codeql.github.com/codeql-query-help/python/py-not-named-self/ | ||
- exclude: | ||
id: py/not-named-self | ||
|
||
# A few occurrences of unused local variables. | ||
# TODO: May be improved. | ||
# https://codeql.github.com/codeql-query-help/python/py-unused-local-variable/ | ||
- exclude: | ||
id: py/unused-local-variable |