Open utensil opened 10 years ago
:+1: Help wanted.
(By the way, Marek is @breznak!)
@rhyolight commented 2 hours ago
(By the way, Marek is @breznak!)
Aha! :wink:
As @breznak suggested in https://github.com/numenta/nupic.core/pull/71#issuecomment-40406141:
It'd be nice having it run as a github "check hook" http://stackoverflow.com/questions/2574416/testing-of-coding-and-naming-conventions-of-c-c-code
Also cc @david-ragazzi
At least we have the following two tools for linting:
They are good at detecting code defects(which is definitely useful), but neither of them or the other tools I can find can check style stuff like the following(mentioned in C Coding Guide ):
Plus Google's http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py that enforces Google C++ Style Guide http://google-styleguide.googlecode.com/svn/trunk/cppguide.html
Also, looking at Vera++ https://bitbucket.org/verateam/vera/wiki/Home
Not sure how these would work automatically with github hooks? Are we just after a report from the lint?
Vera++ looks awesome!
To see the extent of Lint changes I've done a quick pass over src/ using Vera++ My feature branch below has .vera files alongside the cpp, hpp, c, and h files.
https://github.com/rcrowder/nupic.core/tree/70-adding-lint/src
I used the rules supplied, no custom rules or transformations used. Just -nofail and -nodup options (see vera.bat).
The majority of the changes are expected. Doesn't seem like too much work to handle this initially. Then find some way to add it to a CI build and report any issues back into the tooling system?
At some point comparison passes with an other lint tools needs to be made. Such as with cpplint.py or Cppcheck.
CC @breznak @david-ragazzi
@rcrowder Before adding this to CI, let's make sure developers can run in a git pre-commit
hook. Do you know how to set that up?
@rhyolight I have seen that, but not tried it out. I'll leave that branch up, but going to finish the windows port first. Most of the issues found by Vera++ are fairly trivial changes. Something for a newbie maybe..
I understand I haven't been able to work on nupic.core
lately and I'm not sure when would I be able to work on this issue, but after I saw https://github.com/numenta/nupic.core/pull/890#issuecomment-239029920 , I found this old issue and assigned this to myself (thanks to the multiple-assignee feature) and I do have some related work lately involving cppcheck
and coverity
(related to #61 ).
And this issue is also related to #945
As @breznak suggested at https://github.com/numenta/nupic.core/issues/41#issuecomment-39838146 and http://lists.numenta.org/pipermail/nupic-hackers_lists.numenta.org/2014-April/000521.html :
nupic.core
should adopt or implement alint
tool and write rules to validate and ensure conventions .