Comments (5)
Thanks for the bug report. I've fixed it.
The bug wasn't because of the content of the comment, but the macro definition. Lizard tried to read until the end of the line with it starts with #,
I've made a new release in pypi.
Please kindly verify the fix and close the issue. Thanks:-)
from lizard.
The fix works for avmcard.h
but now I get another crash in lib/div64.c
Here is another cutout.
uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base)
{
uint64_t rem = *n;
uint64_t b = base;
uint64_t res, d = 1;
uint32_t high = rem >> 32;
while ((int64_t)b > 0 && b < rem) {
b = b+b;
d = d+d;
}
do {
if (rem >= b) {
rem -= b;
res += d;
}
b >>= 1;
d >>= 1;
} while (d);
}
Traceback (most recent call last):
File "/home/cocobo/repository/lizard/lizard", line 6, in <module>
lizard_main(sys.argv)
File "/home/cocobo/repository/lizard/lizard.py", line 942, in lizard_main
printer(result, options)
File "/home/cocobo/repository/lizard/lizard.py", line 819, in print_result
code_infos, option.extensions, scheme)
File "/home/cocobo/repository/lizard/lizard.py", line 787, in print_and_save_modules
for module_info in all_modules:
File "/home/cocobo/repository/lizard/lizard.py", line 643, in __call__
filename, open(filename, 'rU').read())
File "/home/cocobo/repository/lizard/lizard.py", line 654, in analyze_source_code
for _ in tokens:
File "/home/cocobo/repository/lizard/lizard.py", line 630, in token_processor_for_function
reader.state(token)
File "/home/cocobo/repository/lizard/lizard.py", line 323, in state
self._state(token)
File "/home/cocobo/repository/lizard/lizard.py", line 456, in _state_template_in_name
if self.bracket_stack.pop() != "<":
IndexError: pop from empty list
from lizard.
Ok. Fixed and I've tested it against the linux kernel myself.
It took like 3 minutes with a -t8 option on my computer.
thanks!
from lizard.
==========================================================================================
Total nloc Avg.nloc Avg CCN Avg token Fun Cnt Warning cnt Fun Rt nloc Rt
------------------------------------------------------------------------------------------
9849441 20 4.38 136.23 357394 14824 0.04 0.22
from lizard.
Thanks for the quick fix. Problem resolved.
from lizard.
Related Issues (20)
- Python Hinting causes issues with function parameter count
- Show CCN only, hide other fields
- lizard --sort cyclomatic_complexity --CCN 10 shows a file with CCN score of 1
- lizard -w --sort cyclomatic_complexity --CCN 10 -H includes all files instead of CCN >10
- Is it accurate to get the result data of fan-in fan-out HOT 1
- lizard gets confused by C++ thousands seperator in hex and binary numbers
- Lizard groups nearly 100 lines into one "function" in a Rust file HOT 4
- Installing lizard using pip doesn't work
- Process error with Objective-C block
- Lizard script doesn't working with jython in springboot applicatoion
- Wrong PARAM count for void type in C/C++
- top_nesting_level stay to 0
- Extension documentation HOT 2
- are there plans to add support for python 3.11 HOT 1
- Not used function_stack property
- Implement argument to set duplicate threshold and add possibility to skip part of file
- Extensions "mjs" and "cjs" do not work HOT 1
- Allow for alternatives to 'GENERATED CODE' to indicate generated files
- Allow for failing cases to be printed to stderr
- Fail brew install on XcodeCloud HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lizard.