mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
fix some more style-guide violations in the alert-messages
This commit is contained in:
@@ -13,4 +13,4 @@ import python
|
||||
|
||||
from Global g
|
||||
where not g.getScope() instanceof Module
|
||||
select g, "Updating global variables except at module initialization is discouraged"
|
||||
select g, "Updating global variables except at module initialization is discouraged."
|
||||
|
||||
@@ -44,4 +44,4 @@ predicate escaping_capturing_looping_construct(CallableExpr capturing, AstNode l
|
||||
|
||||
from CallableExpr capturing, AstNode loop, Variable var
|
||||
where escaping_capturing_looping_construct(capturing, loop, var)
|
||||
select capturing, "Capture of loop variable '$@'", loop, var.getId()
|
||||
select capturing, "Capture of loop variable $@.", loop, var.getId()
|
||||
|
||||
@@ -67,5 +67,5 @@ where
|
||||
forall(Name el | el = asgn1.getParentNode().(Tuple).getAnElt() | multiply_defined(el, _, _)) and
|
||||
not uninteresting_definition(asgn1)
|
||||
select asgn1,
|
||||
"This assignment to '" + v.getId() +
|
||||
"' is unnecessary as it is redefined $@ before this value is used.", asgn2 as t, "here"
|
||||
"This assignment to '" + v.getId() + "' is unnecessary as $@ before this value is used.", asgn2,
|
||||
"it is redefined"
|
||||
|
||||
@@ -67,4 +67,4 @@ where
|
||||
def.defines(g) and
|
||||
not assigned_pytest_fixture(g) and
|
||||
not g.getId() = "_"
|
||||
select d, "Local variable '" + g.getId() + "' shadows a global variable defined $@.", def, "here"
|
||||
select d, "Local variable '" + g.getId() + "' shadows a $@.", def, "global variable"
|
||||
|
||||
@@ -43,4 +43,4 @@ where
|
||||
not initialized_as_local(p) and
|
||||
not template_attribute(p) and
|
||||
not_a_global(p)
|
||||
select p, "This use of place-holder variable '" + p.getId() + "' may be undefined"
|
||||
select p, "This use of place-holder variable '" + p.getId() + "' may be undefined."
|
||||
|
||||
@@ -43,4 +43,4 @@ where
|
||||
unused_local(unused, v) and
|
||||
// If unused is part of a tuple, count it as unused if all elements of that tuple are unused.
|
||||
forall(Name el | el = unused.getParentNode().(Tuple).getAnElt() | unused_local(el, _))
|
||||
select unused, "Variable " + v.getId() + " is not used"
|
||||
select unused, "Variable " + v.getId() + " is not used."
|
||||
|
||||
Reference in New Issue
Block a user