Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
global-variable-not-assigned
check local scope (#4990)
* Make ``global-variable-not-assigned`` check local scope This checker now checks whether the names after the global keyword are reassigned in the local scope. This closes #1375 * Make ``global-variable-not-assigned`` check functions This checker now also checks function defintions in the module and local scope This closes #330 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
- Loading branch information
1 parent
7390b6f
commit dcd4887
Showing
8 changed files
with
78 additions
and
12 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
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
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
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
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
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,7 +1,11 @@ | ||
global-at-module-level:4:0::Using the global statement at the module level | ||
undefined-variable:5:6::Undefined variable 'CSTE' | ||
global-statement:11:4:fix_contant:Using the global statement | ||
global-variable-not-assigned:18:4:other:Using global for 'HOP' but no assignment is done | ||
undefined-variable:19:10:other:Undefined variable 'HOP' | ||
global-variable-undefined:24:4:define_constant:Global variable 'SOMEVAR' undefined at the module level | ||
global-statement:31:4:global_with_import:Using the global statement | ||
global-at-module-level:5:0::Using the global statement at the module level:HIGH | ||
undefined-variable:6:6::Undefined variable 'CSTE':HIGH | ||
global-statement:14:4:fix_contant:Using the global statement:HIGH | ||
global-variable-not-assigned:21:4:other:Using global for 'HOP' but no assignment is done:HIGH | ||
undefined-variable:22:10:other:Undefined variable 'HOP':HIGH | ||
global-variable-undefined:27:4:define_constant:Global variable 'SOMEVAR' undefined at the module level:HIGH | ||
global-statement:33:4:global_with_import:Using the global statement:HIGH | ||
global-variable-not-assigned:39:4:global_no_assign:Using global for 'CONSTANT' but no assignment is done:HIGH | ||
global-statement:45:4:global_operator_assign:Using the global statement:HIGH | ||
global-statement:52:4:global_function_assign:Using the global statement:HIGH | ||
global-statement:62:4:override_func:Using the global statement:HIGH |
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
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