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

WIP: Add static code analysis #2912

Closed
wants to merge 2 commits into from
Closed

WIP: Add static code analysis #2912

wants to merge 2 commits into from

Conversation

sils
Copy link

@sils sils commented Apr 18, 2016

related to #2906

still pretty early, I just did some basic PEP8ing to your python code, more stuff can follow and I think some stuff needs manual refactoring.

@biodranik
Copy link
Contributor

Why do we need that? I mean, just formatting changes?

3party folder should stay untouched, it will be hard to update other libraries after changes.

And python is not a crucial language in our project, we are more interested in C++/Java(Android)/ObjectiveC++ static code analyzers which can help us to find potential errors before they show up to our users.

@sils
Copy link
Author

sils commented Apr 18, 2016

This is formatting only, analysis can happen on any level. That was what I meant with "what do you want/need"

@biodranik
Copy link
Contributor

Formatting fixes usually break line history (git blame), not sure that it's a good idea.

@ygorshenin
Copy link
Contributor

In any case, it's not a good idea to modify 3party - this code mostly written by non-maps.me developers and we sometimes pull latest versions.

@sils
Copy link
Author

sils commented Apr 18, 2016

I can totally exclude the folder. Also we can improve codestyle iterative with GitMate (shows only new issues) if you don't want an initial cleanup

@biodranik
Copy link
Contributor

I was more interested in what your static analyzes say about our current code. Which issues can it find and highlight right now.

@sils
Copy link
Author

sils commented Apr 19, 2016

Hi,

I'll look into that, it might take some time because a lot of other stuff is eating up all my time.

To clarify: coala currently can do some light analysis language independently. For C we currently have (apart from the usual style stuff) a clang integration which can do a lot but clang usually needs a rather complicated setup, a rather sophisticated code clone detection but I'm afraid this one's not performant enough for this kind of code base (those algorithms have ugly complexities). A cyclomatic complexity and a more performant code clone detection is in the works. I'd look into setting up clang, te complexity measurement and the code clone detection then.

@sils
Copy link
Author

sils commented Apr 25, 2016

btw. your complexity looks good, we found one false positive only and evaluating now on how to improve our algorithm

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

Successfully merging this pull request may close these issues.

None yet

4 participants