lizard 1.17.25__tar.gz → 1.17.28__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lizard-1.17.25 → lizard-1.17.28}/PKG-INFO +1 -1
- {lizard-1.17.25 → lizard-1.17.28}/lizard.egg-info/PKG-INFO +1 -1
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/version.py +1 -1
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/java.py +39 -3
- {lizard-1.17.25 → lizard-1.17.28}/LICENSE.txt +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/README.rst +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard.egg-info/SOURCES.txt +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard.egg-info/dependency_links.txt +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard.egg-info/entry_points.txt +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard.egg-info/requires.txt +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard.egg-info/top_level.txt +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/__init__.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/auto_open.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/csvoutput.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/default_ordered_dict.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/extension_base.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/htmloutput.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/keywords.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardboolcount.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardcomplextags.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardcpre.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizarddependencycount.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizarddumpcomments.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardduplicate.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardduplicated_param_list.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardexitcount.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardgotocount.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardignoreassert.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardio.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardmccabe.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardmodified.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardnd.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardnonstrict.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardns.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardoutside.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardstatementcount.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/lizardwordcount.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_ext/xmloutput.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/__init__.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/clike.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/code_reader.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/csharp.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/erlang.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/fortran.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/gdscript.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/go.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/golike.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/javascript.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/js_style_language_states.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/js_style_regex_expression.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/jsx.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/kotlin.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/lua.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/objc.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/perl.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/php.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/python.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/ruby.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/rubylike.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/rust.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/scala.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/script_language.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/solidity.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/swift.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/tnsdl.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/tsx.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/ttcn.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/typescript.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/vue.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/lizard_languages/zig.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/setup.cfg +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/setup.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testApplication.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testAssertionExtension.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testBasicFunctionInfo.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testCOutsideComplexity.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testCPreprocessorExtension.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testCommentOptions.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testCyclomaticComplexity.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testExtension.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testFilesFilter.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testFunctionDependencyCount.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testFunctionExitCount.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testFunctionGotoCount.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testFunctionStatementCount.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testHelpers.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testLanguages.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testMcCabe.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testNestedStructures.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testNestingDepth.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testOutput.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testOutputCSV.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testOutputFile.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testOutputHTML.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/testTokenizer.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/test_analyzer.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/test_auto_open.py +0 -0
- {lizard-1.17.25 → lizard-1.17.28}/test/test_options.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lizard
|
|
3
|
-
Version: 1.17.
|
|
3
|
+
Version: 1.17.28
|
|
4
4
|
Summary: A code analyzer without caring the C/C++ header files. It works with Java, C/C++, JavaScript, Python, Ruby, Swift, Objective C. Metrics includes cyclomatic complexity number etc.
|
|
5
5
|
Home-page: http://www.lizard.ws
|
|
6
6
|
Download-URL: https://pypi.python.org/lizard/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lizard
|
|
3
|
-
Version: 1.17.
|
|
3
|
+
Version: 1.17.28
|
|
4
4
|
Summary: A code analyzer without caring the C/C++ header files. It works with Java, C/C++, JavaScript, Python, Ruby, Swift, Objective C. Metrics includes cyclomatic complexity number etc.
|
|
5
5
|
Home-page: http://www.lizard.ws
|
|
6
6
|
Download-URL: https://pypi.python.org/lizard/
|
|
@@ -25,13 +25,18 @@ class JavaStates(CLikeStates): # pylint: disable=R0903
|
|
|
25
25
|
self.class_name = None
|
|
26
26
|
self.is_record = False
|
|
27
27
|
self.in_record_constructor = False
|
|
28
|
+
self.in_method_body = False
|
|
28
29
|
|
|
29
30
|
def _state_old_c_params(self, token):
|
|
30
31
|
if token == '{':
|
|
31
32
|
self._state_dec_to_imp(token)
|
|
32
33
|
|
|
33
34
|
def _state_imp(self, token):
|
|
35
|
+
# When entering a function implementation, set the flag
|
|
36
|
+
self.in_method_body = True
|
|
34
37
|
def callback():
|
|
38
|
+
# When exiting the function implementation, clear the flag
|
|
39
|
+
self.in_method_body = False
|
|
35
40
|
self.next(self._state_global)
|
|
36
41
|
self.sub_state(JavaFunctionBodyStates(self.context), callback, token)
|
|
37
42
|
|
|
@@ -103,15 +108,46 @@ class JavaStates(CLikeStates): # pylint: disable=R0903
|
|
|
103
108
|
class JavaFunctionBodyStates(JavaStates):
|
|
104
109
|
def __init__(self, context):
|
|
105
110
|
super(JavaFunctionBodyStates, self).__init__(context)
|
|
111
|
+
self.in_method_body = True
|
|
112
|
+
self.ignore_tokens = False # Additional flag to ignore tokens that could confuse the parser
|
|
113
|
+
self.handling_dot_class = False # Flag to handle .class token specifically
|
|
114
|
+
self.handling_method_ref = False # Flag to handle method references
|
|
106
115
|
|
|
107
116
|
@CodeStateMachine.read_inside_brackets_then("{}", "_state_dummy")
|
|
108
117
|
@CodeStateMachine.read_inside_brackets_then("()", "_state_dummy")
|
|
109
118
|
def _state_global(self, token):
|
|
119
|
+
# Handle method references (::new, ::methodName)
|
|
120
|
+
if token == "::":
|
|
121
|
+
self.handling_method_ref = True
|
|
122
|
+
return
|
|
123
|
+
if self.handling_method_ref:
|
|
124
|
+
self.handling_method_ref = False
|
|
125
|
+
return
|
|
126
|
+
|
|
127
|
+
# Special handling for .class token
|
|
128
|
+
if token == "." and not self.handling_dot_class:
|
|
129
|
+
self.handling_dot_class = True
|
|
130
|
+
return
|
|
131
|
+
if self.handling_dot_class:
|
|
132
|
+
self.handling_dot_class = False
|
|
133
|
+
if token == "class":
|
|
134
|
+
return # Skip the 'class' token after a dot
|
|
135
|
+
|
|
136
|
+
# Special handling for tokens that could confuse the parser
|
|
137
|
+
if self.ignore_tokens:
|
|
138
|
+
self.ignore_tokens = False
|
|
139
|
+
return
|
|
140
|
+
|
|
110
141
|
if token == "new":
|
|
111
142
|
self.next(self._state_new)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
143
|
+
else:
|
|
144
|
+
# Always try to parse class declarations, even in method bodies
|
|
145
|
+
# This ensures that local classes are properly detected
|
|
146
|
+
if self._try_start_a_class(token):
|
|
147
|
+
return
|
|
148
|
+
|
|
149
|
+
if self.br_count == 0:
|
|
150
|
+
self.statemachine_return()
|
|
115
151
|
|
|
116
152
|
def _state_dummy(self, _):
|
|
117
153
|
pass
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|