-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add code quality suite selector and use that in the code quality suites #19413
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e3a6681
Add code quality suite selector
tamasvajk ea9b957
Use code-quality-selectors in C# suite
tamasvajk 425e020
Use code-quality-selectors in Java suite
tamasvajk bb46ca7
Modify quality query suite selector for actions, cpp, rust and swift
tamasvajk 2515b06
Use code-quality-selectors in Go suite
tamasvajk d56c522
Use code-quality-selectors in JS suite
tamasvajk fdeac95
Use code-quality-selectors in Python suite
tamasvajk e9e6d68
Use code-quality-selectors in Ruby suite
tamasvajk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 +1,3 @@ | ||
[] | ||
- queries: . | ||
- apply: code-quality-selectors.yml | ||
from: codeql/suite-helpers |
This file contains hidden or 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 +1,3 @@ | ||
[] | ||
- queries: . | ||
- apply: code-quality-selectors.yml | ||
from: codeql/suite-helpers |
This file contains hidden or 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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* @id cs/invalid-string-formatting | ||
* @tags reliability | ||
* maintainability | ||
* quality | ||
*/ | ||
|
||
import csharp | ||
|
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
* @id cs/constant-condition | ||
* @tags maintainability | ||
* readability | ||
* quality | ||
* external/cwe/cwe-835 | ||
*/ | ||
|
||
|
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
* @tags reliability | ||
* correctness | ||
* logic | ||
* quality | ||
* external/cwe/cwe-193 | ||
*/ | ||
|
||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* @tags reliability | ||
* correctness | ||
* logic | ||
* quality | ||
*/ | ||
|
||
import csharp | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
* @tags reliability | ||
* correctness | ||
* logic | ||
* quality | ||
* external/cwe/cwe-480 | ||
* external/cwe/cwe-691 | ||
*/ | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
* @id cs/equality-on-floats | ||
* @tags reliability | ||
* correctness | ||
* quality | ||
*/ | ||
|
||
import csharp | ||
|
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* @tags reliability | ||
* correctness | ||
* logic | ||
* quality | ||
*/ | ||
|
||
import csharp | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
* @id cs/unchecked-cast-in-equals | ||
* @tags reliability | ||
* maintainability | ||
* quality | ||
*/ | ||
|
||
import csharp | ||
|
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* @id cs/call-to-object-tostring | ||
* @tags reliability | ||
* maintainability | ||
* quality | ||
*/ | ||
|
||
import DefaultToStringQuery |
This file contains hidden or 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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* @id cs/useless-gethashcode-call | ||
* @tags readability | ||
* useless-code | ||
* quality | ||
*/ | ||
|
||
import csharp | ||
|
This file contains hidden or 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,17 +1,3 @@ | ||
- queries: . | ||
- include: | ||
id: | ||
- cs/index-out-of-bounds | ||
- cs/test-for-negative-container-size | ||
- cs/unchecked-cast-in-equals | ||
- cs/reference-equality-on-valuetypes | ||
- cs/self-assignment | ||
- cs/inefficient-containskey | ||
- cs/call-to-object-tostring | ||
- cs/local-not-disposed | ||
- cs/constant-condition | ||
- cs/useless-gethashcode-call | ||
- cs/non-short-circuit | ||
- cs/useless-assignment-to-local | ||
- cs/invalid-string-formatting | ||
- cs/equality-on-floats | ||
- apply: code-quality-selectors.yml | ||
from: codeql/suite-helpers |
This file contains hidden or 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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* @tags reliability | ||
* correctness | ||
* logic | ||
* quality | ||
* external/cwe/cwe-193 | ||
* @precision high | ||
*/ | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* @tags reliability | ||
* correctness | ||
* logic | ||
* quality | ||
* @precision high | ||
*/ | ||
|
||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
* correctness | ||
* call | ||
* defer | ||
* quality | ||
*/ | ||
|
||
import go | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
* @tags reliability | ||
* correctness | ||
* logic | ||
* quality | ||
* @precision high | ||
*/ | ||
|
||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
* @precision very-high | ||
* @id go/negative-length-check | ||
* @tags correctness | ||
* quality | ||
*/ | ||
|
||
import go | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* @id go/redundant-recover | ||
* @tags maintainability | ||
* correctness | ||
* quality | ||
* @precision high | ||
*/ | ||
|
||
|
This file contains hidden or 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,9 +1,3 @@ | ||
- queries: . | ||
- include: | ||
id: | ||
- go/unhandled-writable-file-close | ||
- go/unexpected-nil-value | ||
- go/negative-length-check | ||
- go/redundant-recover | ||
- go/missing-error-check | ||
- go/index-out-of-bounds | ||
- apply: code-quality-selectors.yml | ||
from: codeql/suite-helpers |
1 change: 0 additions & 1 deletion
1
java/ql/integration-tests/java/query-suite/java-code-quality.qls.expected
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
* @tags reliability | ||
* readability | ||
* types | ||
* quality | ||
*/ | ||
|
||
import java | ||
|
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* @id java/equals-on-unrelated-types | ||
* @tags reliability | ||
* correctness | ||
* quality | ||
*/ | ||
|
||
import java | ||
|
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* @id java/unchecked-cast-in-equals | ||
* @tags reliability | ||
* correctness | ||
* quality | ||
*/ | ||
|
||
import java | ||
|
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
* @id java/contradictory-type-checks | ||
* @tags correctness | ||
* logic | ||
* quality | ||
*/ | ||
|
||
import java | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
* @precision high | ||
* @id java/suspicious-date-format | ||
* @tags correctness | ||
* quality | ||
*/ | ||
|
||
import java | ||
|
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,17 +1,3 @@ | ||
- queries: . | ||
- include: | ||
id: | ||
- java/contradictory-type-checks | ||
- java/do-not-call-finalize | ||
- java/equals-on-unrelated-types | ||
- java/inconsistent-equals-and-hashcode | ||
- java/input-resource-leak | ||
- java/integer-multiplication-cast-to-long | ||
- java/junit5-missing-nested-annotation | ||
- java/output-resource-leak | ||
- java/reference-equality-of-boxed-types | ||
- java/string-replace-all-with-non-regex | ||
- java/suspicious-date-format | ||
- java/type-variable-hides-type | ||
- java/unchecked-cast-in-equals | ||
- java/unused-container | ||
- apply: code-quality-selectors.yml | ||
from: codeql/suite-helpers |
This file contains hidden or 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 |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
* @precision high | ||
* @tags correctness | ||
* typescript | ||
* quality | ||
*/ | ||
|
||
import javascript | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
* @problem.severity warning | ||
* @id js/missing-await | ||
* @tags correctness | ||
* quality | ||
* @precision high | ||
*/ | ||
|
||
|
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,8 +1,3 @@ | ||
- queries: . | ||
- include: | ||
id: | ||
- js/missing-await | ||
- js/regex/always-matches | ||
- js/superfluous-trailing-arguments | ||
- js/useless-expression | ||
- js/ineffective-parameter-type | ||
- apply: code-quality-selectors.yml | ||
from: codeql/suite-helpers |
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- description: Selectors for selecting the Code-Quality-relevant queries for a language | ||
- include: | ||
kind: | ||
- problem | ||
- path-problem | ||
precision: | ||
- high | ||
- very-high | ||
tags contain: | ||
- quality |
2 changes: 2 additions & 0 deletions
2
python/ql/integration-tests/query-suite/python-code-quality.qls.expected
This file contains hidden or 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,4 +1,6 @@ | ||
ql/python/ql/src/Functions/NonCls.ql | ||
ql/python/ql/src/Functions/NonSelf.ql | ||
ql/python/ql/src/Functions/ReturnConsistentTupleSizes.ql | ||
ql/python/ql/src/Functions/SignatureSpecialMethods.ql | ||
ql/python/ql/src/Resources/FileNotAlwaysClosed.ql | ||
ql/python/ql/src/Variables/LoopVariableCapture/LoopVariableCapture.ql | ||
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.