-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
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. |
This is formatting only, analysis can happen on any level. That was what I meant with "what do you want/need" |
Formatting fixes usually break line history (git blame), not sure that it's a good idea. |
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. |
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 |
I was more interested in what your static analyzes say about our current code. Which issues can it find and highlight right now. |
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. |
btw. your complexity looks good, we found one false positive only and evaluating now on how to improve our algorithm |
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.