Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lizard groups nearly 100 lines into one "function" in a Rust file #363

Open
rjray opened this issue Nov 4, 2022 · 4 comments
Open

Lizard groups nearly 100 lines into one "function" in a Rust file #363

rjray opened this issue Nov 4, 2022 · 4 comments

Comments

@rjray
Copy link

rjray commented Nov 4, 2022

This is the file, at the current version: https://github.com/rjray/mscs-thesis-project/blob/811b319cd81d7901a248a5cebe840daeb63a2a75/src/Rust/aho_corasick/src/main.rs
This should remain good even if I make further changes to the file.
When I run the command lizard Rust/aho_corasick/src/main.rs, the resulting analysis counts lines 50-147 as a single function it calls iter. This starts inside an impl block for one struct, and completely subsumes a second struct/impl definition as well as two other functions.

@503440692
Copy link

503440692 commented Nov 17, 2022

image
There are syntax error in your source code. If the source code like following picture, the tool work fine:
image

@rjray
Copy link
Author

rjray commented Nov 17, 2022

That is incorrect. The code as written is correct, this is valid Rust syntax. The change you suggest would actually break the code.

@a1phyr
Copy link

a1phyr commented Apr 4, 2023

Is there any progress on this ?

@rjray
Copy link
Author

rjray commented Jul 2, 2023

Bumping for visibility. I used this tool for my MSCS thesis research last fall, but had to use a separate tool for CCN in Rust. I am continuing this research, and would really like to be able to use the same tool (this tool) for all languages in my study (C, C++, Rust, possibly Go and Java as well). Switching tools for one or two of the languages makes it harder to compare the CCN of the different languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants