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

cpplint.py is outdated #1035

Open
bt2901 opened this issue Nov 8, 2020 · 0 comments
Open

cpplint.py is outdated #1035

bt2901 opened this issue Nov 8, 2020 · 0 comments

Comments

@bt2901
Copy link
Contributor

bt2901 commented Nov 8, 2020

There is a utils/cpplint.py file. As far as I understand, this is a modified version of google code style linter (with one additional check added: see #178).

The problem is, this version is really outdated. It silently crashes when run with Python 3. Nowadays, cpplint is available on PyPi, so the best way appears to change codestyle.sh to run this more recent version:

instead of

  3 cat utils/cpplint_files.txt | xargs python utils/cpplint.py --linelength=120 || exit 1

run this

  3 cat utils/cpplint_files.txt | xargs python -m cpplint --linelength=120 || exit 1

The problem is, we'll lose additional check from #178 because you cannot pass extra_check_functions into cpplint (they are hardcoded). The best solution seems to make a fork of Google cpplint repo, tweak some stuff inside it and then install the fork via pip.

I'm disabling codestyle_checks.sh for now.

PS: does cpplint check for BigARTM-specific code style rules from https://github.com/bigartm/bigartm/blob/master/docs/devguide/code_style.txt ? Notably, the two spaces thing? I don't think it does.

PPS: Also, it reports 57 total errors currently. These probably should be fixed.

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

1 participant