Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
ql/python/ql/src/AlertSuppression.ql
ql/python/ql/src/Classes/MaybeUndefinedClassAttribute.ql
ql/python/ql/src/Classes/ShouldBeContextManager.ql
ql/python/ql/src/Classes/UndefinedClassAttribute.ql
ql/python/ql/src/Classes/UselessClass.ql
ql/python/ql/src/Expressions/NonPortableComparisonUsingIs.ql
ql/python/ql/src/Filters/ClassifyFiles.ql
ql/python/ql/src/Functions/ReturnValueIgnored.ql
ql/python/ql/src/Imports/ImportShadowedByLoopVar.ql
ql/python/ql/src/Imports/ImportStarUsed.ql
ql/python/ql/src/Imports/Imports.ql
Expand Down Expand Up @@ -59,16 +55,12 @@ ql/python/ql/src/Metrics/TransitiveImports.ql
ql/python/ql/src/Security/CWE-020-ExternalAPIs/ExternalAPIsUsedWithUntrustedData.ql
ql/python/ql/src/Security/CWE-020-ExternalAPIs/UntrustedDataToExternalAPI.ql
ql/python/ql/src/Security/CWE-798/HardcodedCredentials.ql
ql/python/ql/src/Statements/AssertLiteralConstant.ql
ql/python/ql/src/Statements/C_StyleParentheses.ql
ql/python/ql/src/Statements/DocStrings.ql
ql/python/ql/src/Statements/ExecUsed.ql
ql/python/ql/src/Statements/StringConcatenationInLoop.ql
ql/python/ql/src/Variables/Global.ql
ql/python/ql/src/Variables/ShadowBuiltin.ql
ql/python/ql/src/Variables/ShadowGlobal.ql
ql/python/ql/src/Variables/UndefinedGlobal.ql
ql/python/ql/src/Variables/UnusedParameter.ql
ql/python/ql/src/analysis/CallGraphEfficiency.ql
ql/python/ql/src/analysis/CallGraphMarginalEfficiency.ql
ql/python/ql/src/analysis/Consistency.ql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ ql/python/ql/src/Classes/DefineEqualsWhenAddingAttributes.ql
ql/python/ql/src/Classes/InconsistentMRO.ql
ql/python/ql/src/Classes/InitCallsSubclass/InitCallsSubclassMethod.ql
ql/python/ql/src/Classes/MutatingDescriptor.ql
ql/python/ql/src/Classes/OverwritingAttributeInSuperClass.ql
ql/python/ql/src/Classes/ShouldBeContextManager.ql
ql/python/ql/src/Classes/SubclassShadowing/SubclassShadowing.ql
ql/python/ql/src/Classes/UselessClass.ql
ql/python/ql/src/Classes/WrongNameForArgumentInClassInstantiation.ql
ql/python/ql/src/Classes/WrongNumberArgumentsInClassInstantiation.ql
ql/python/ql/src/Exceptions/CatchingBaseException.ql
Expand All @@ -37,6 +40,7 @@ ql/python/ql/src/Expressions/Formatting/WrongNumberArgumentsFor3101Format.ql
ql/python/ql/src/Expressions/HashedButNoHash.ql
ql/python/ql/src/Expressions/IncorrectComparisonUsingIs.ql
ql/python/ql/src/Expressions/NonCallableCalled.ql
ql/python/ql/src/Expressions/NonPortableComparisonUsingIs.ql
ql/python/ql/src/Expressions/Regex/BackspaceEscape.ql
ql/python/ql/src/Expressions/Regex/DuplicateCharacterInSet.ql
ql/python/ql/src/Expressions/Regex/MissingPartSpecialGroup.ql
Expand All @@ -61,10 +65,12 @@ ql/python/ql/src/Functions/NonCls.ql
ql/python/ql/src/Functions/NonSelf.ql
ql/python/ql/src/Functions/OverlyComplexDelMethod.ql
ql/python/ql/src/Functions/ReturnConsistentTupleSizes.ql
ql/python/ql/src/Functions/ReturnValueIgnored.ql
ql/python/ql/src/Functions/SignatureOverriddenMethod.ql
ql/python/ql/src/Functions/SignatureSpecialMethods.ql
ql/python/ql/src/Functions/UseImplicitNoneReturnValue.ql
ql/python/ql/src/Imports/EncodingError.ql
ql/python/ql/src/Imports/FromImportOfMutableAttribute.ql
ql/python/ql/src/Imports/ImportandImportFrom.ql
ql/python/ql/src/Imports/ModuleImportsItself.ql
ql/python/ql/src/Imports/MultipleImports.ql
Expand All @@ -73,7 +79,9 @@ ql/python/ql/src/Imports/UnintentionalImport.ql
ql/python/ql/src/Imports/UnusedImport.ql
ql/python/ql/src/Lexical/CommentedOutCode.ql
ql/python/ql/src/Resources/FileNotAlwaysClosed.ql
ql/python/ql/src/Statements/AssertLiteralConstant.ql
ql/python/ql/src/Statements/AssertOnTuple.ql
ql/python/ql/src/Statements/BreakOrReturnInFinally.ql
ql/python/ql/src/Statements/ConstantInConditional.ql
ql/python/ql/src/Statements/IterableStringOrSequence.ql
ql/python/ql/src/Statements/MismatchInMultipleAssignment.ql
Expand All @@ -82,6 +90,7 @@ ql/python/ql/src/Statements/NestedLoopsSameVariable.ql
ql/python/ql/src/Statements/NestedLoopsSameVariableWithReuse.ql
ql/python/ql/src/Statements/NonIteratorInForLoop.ql
ql/python/ql/src/Statements/RedundantAssignment.ql
ql/python/ql/src/Statements/ReturnOrYieldOutsideFunction.ql
ql/python/ql/src/Statements/ShouldUseWithStatement.ql
ql/python/ql/src/Statements/SideEffectInAssert.ql
ql/python/ql/src/Statements/StatementNoEffect.ql
Expand All @@ -95,7 +104,12 @@ ql/python/ql/src/Testing/ImpreciseAssert.ql
ql/python/ql/src/Variables/GlobalAtModuleLevel.ql
ql/python/ql/src/Variables/LoopVariableCapture/LoopVariableCapture.ql
ql/python/ql/src/Variables/MultiplyDefined.ql
ql/python/ql/src/Variables/ShadowBuiltin.ql
ql/python/ql/src/Variables/ShadowGlobal.ql
ql/python/ql/src/Variables/SuspiciousUnusedLoopIterationVariable.ql
ql/python/ql/src/Variables/UndefinedExport.ql
ql/python/ql/src/Variables/UndefinedPlaceHolder.ql
ql/python/ql/src/Variables/UninitializedLocal.ql
ql/python/ql/src/Variables/UnusedLocalVariable.ql
ql/python/ql/src/Variables/UnusedModuleVariable.ql
ql/python/ql/src/Variables/UnusedParameter.ql
6 changes: 3 additions & 3 deletions python/ql/src/Classes/OverwritingAttributeInSuperClass.ql
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* @name Overwriting attribute in super-class or sub-class
* @description Assignment to self attribute overwrites attribute previously defined in subclass or superclass `__init__` method.
* @kind problem
* @tags reliability
* maintainability
* modularity
* @tags quality
* reliability
* correctness
* @problem.severity warning
* @sub-severity low
* @precision medium
Expand Down
5 changes: 3 additions & 2 deletions python/ql/src/Classes/ShouldBeContextManager.ql
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
* @description Making a class a context manager allows instances to be used in a 'with' statement.
* This improves resource handling and code readability.
* @kind problem
* @tags maintainability
* @tags quality
* maintainability
* readability
* convention
* performance
* @problem.severity recommendation
* @sub-severity high
* @precision medium
Expand Down
4 changes: 3 additions & 1 deletion python/ql/src/Classes/UselessClass.ql
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
* @name Useless class
* @description Class only defines one public method (apart from `__init__` or `__new__`) and should be replaced by a function
* @kind problem
* @tags maintainability
* @tags quality
* maintainability
* useless-code
* complexity
* @problem.severity recommendation
* @sub-severity low
* @precision medium
Expand Down
5 changes: 3 additions & 2 deletions python/ql/src/Expressions/NonPortableComparisonUsingIs.ql
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
* @name Non-portable comparison using is when operands support `__eq__`
* @description Comparison using 'is' when equivalence is not the same as identity and may not be portable.
* @kind problem
* @tags portability
* maintainability
* @tags quality
* reliability
* correctness
* @problem.severity recommendation
* @sub-severity low
* @precision medium
Expand Down
7 changes: 3 additions & 4 deletions python/ql/src/Functions/ReturnValueIgnored.ql
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
* @name Ignored return value
* @description Ignoring return values may result in discarding errors or loss of information.
* @kind problem
* @tags reliability
* @tags quality
* reliability
* correctness
* readability
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it allowed to have the readability tag without maintainability?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we are allowed to use sub-categories from both top level categories. The documentation was changed to include "You may use sub-categories from both top-level categories on the same query. However, if you only use sub-categories from a single top-level category, then you must also tag the query with that top-level category."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. This looks good then.

* convention
* statistical
* non-attributable
* external/cwe/cwe-252
* @problem.severity recommendation
* @sub-severity high
Expand Down
6 changes: 3 additions & 3 deletions python/ql/src/Imports/FromImportOfMutableAttribute.ql
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* @name Importing value of mutable attribute
* @description Importing the value of a mutable attribute directly means that changes in global state will not be observed locally.
* @kind problem
* @tags reliability
* maintainability
* modularity
* @tags quality
* reliability
* correctness
* @problem.severity warning
* @sub-severity high
* @precision medium
Expand Down
3 changes: 2 additions & 1 deletion python/ql/src/Statements/AssertLiteralConstant.ql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
* @description An assert statement testing a literal constant value may exhibit
* different behavior when optimizations are enabled.
* @kind problem
* @tags reliability
* @tags quality
* reliability
* correctness
* @problem.severity recommendation
* @sub-severity low
Expand Down
6 changes: 4 additions & 2 deletions python/ql/src/Statements/BreakOrReturnInFinally.ql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
* @description Using a Break or Return statement in a finally block causes the
* Try-finally block to exit, discarding the exception.
* @kind problem
* @tags reliability
* maintainability
* @tags quality
* reliability
* error-handling
* correctness
* external/cwe/cwe-584
* @problem.severity warning
* @sub-severity low
Expand Down
1 change: 1 addition & 0 deletions python/ql/src/Statements/DocStrings.ql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* makes it more difficult for other developers to maintain the code.
* @kind problem
* @tags maintainability
* readability
* @problem.severity recommendation
* @sub-severity low
* @precision medium
Expand Down
3 changes: 2 additions & 1 deletion python/ql/src/Statements/ReturnOrYieldOutsideFunction.ql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @name Use of 'return' or 'yield' outside a function
* @description Using 'return' or 'yield' outside a function causes a 'SyntaxError' at runtime.
* @kind problem
* @tags reliability
* @tags quality
* reliability
* correctness
* @problem.severity error
* @sub-severity low
Expand Down
4 changes: 3 additions & 1 deletion python/ql/src/Variables/ShadowBuiltin.ql
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
* makes the built-in object unusable within the current scope and makes the code
* more difficult to read.
* @kind problem
* @tags maintainability
* @tags quality
* maintainability
* readability
* correctness
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar question for correctness without reliability

* @problem.severity recommendation
* @sub-severity low
* @precision medium
Expand Down
4 changes: 3 additions & 1 deletion python/ql/src/Variables/ShadowGlobal.ql
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
* makes the global variable unusable within the current scope and makes the code
* more difficult to read.
* @kind problem
* @tags maintainability
* @tags quality
* maintainability
* readability
* correctness
* @problem.severity recommendation
* @sub-severity low
* @precision medium
Expand Down
3 changes: 2 additions & 1 deletion python/ql/src/Variables/UndefinedPlaceHolder.ql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @name Use of an undefined placeholder variable
* @description Using a variable before it is initialized causes an exception.
* @kind problem
* @tags reliability
* @tags quality
* reliability
* correctness
* @problem.severity error
* @sub-severity low
Expand Down
3 changes: 2 additions & 1 deletion python/ql/src/Variables/UninitializedLocal.ql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @name Potentially uninitialized local variable
* @description Using a local variable before it is initialized causes an UnboundLocalError.
* @kind problem
* @tags reliability
* @tags quality
* reliability
* correctness
* @problem.severity error
* @sub-severity low
Expand Down
5 changes: 4 additions & 1 deletion python/ql/src/Variables/UnusedParameter.ql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
* @name Unused parameter
* @description Parameter is defined but not used
* @kind problem
* @tags maintainability
* @tags quality
* reliability
* correctness
* readability
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readability without maintainability here too.

* @problem.severity recommendation
* @sub-severity high
* @precision medium
Expand Down