-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[ci] added cpplint check #2416
[ci] added cpplint check #2416
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made two suggestions which are effectively style things, but otherwise I love this idea. I'll be adding an R linter soon!
.ci/test.sh
Outdated
conda install -q -y -n $CONDA_ENV pycodestyle pydocstyle | ||
pip install --user cpplint | ||
cpplint --filter=-build/header_guard,-whitespace/line_length --recursive ./src ./include || exit 0 # TODO: change to -1 after fixing #1990 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@StrikerRUS I'm a fan of never putting TODO
s in code, but instead keeping such details in the issues. In this case, you could just add that comment to #1990 if you haven't already.
Also I'm a fan of having commands with more than one argument indented like below, so their git blames are cleaner and so that it's more obvious what they are doing:
cpplint \
--filter=-build/header_guard,-whitespace/line_length \
--recursive \
./src \
./include \
|| exit 0
Up to you on both of these!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jameslamb Thanks for your review!
Agree with your first comment. Will remove TODO
from the code.
Also, agree with your second comment, but I'm a fan of having consistent state, even if it's not perfect 😃 . I mean, we have a lot of such commands with plenty of args in this (and neighboring) file and this line will be "rara avis" here. So, I think such style improvements should be done at once in a separate PR instead of iterative one-line corrections.
I'll be adding an R linter soon!
Nice to hear!
I just changed the order of checks in the latest commit 984d15b with the aim to prevent fast exit due to temporary |
Refer to #1990, #2407 (comment).