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

[ci] fixed cpplint warnings about braces #2869

Merged
merged 2 commits into from
Mar 5, 2020

Conversation

jameslamb
Copy link
Collaborator

This PR eliminates 5 of the 49 remaining cpplint issues, noted in #1990 --> #1990 (comment)

src/io/file_io.cpp:173:  If an else has a brace on one side, it should have it on both  [readability/braces] [5]
src/io/file_io.cpp:186:  If an else has a brace on one side, it should have it on both  [readability/braces] [5]
src/io/file_io.cpp:197:  If an else has a brace on one side, it should have it on both  [readability/braces] [5]
src/io/file_io.cpp:197:  If/else bodies with multiple statements require braces  [readability/braces] [4]
Done processing src/io/file_io.cpp
...
include/LightGBM/tree.h:154:  Line ends in whitespace.  Consider deleting these extra spaces.  [whitespace/end_of_line] [4]

4 of the 5 relate to handling of HDFS files in src/io/file_io.cpp. Instead of using an if-else construct, I think we can get around the linting issue by just relying on the fact that the affected functions already use multiple return statements.

Looks like the relevant lines were introduced in #2769 , @guolinke

@jameslamb jameslamb requested review from guolinke and StrikerRUS March 4, 2020 19:54
@jameslamb jameslamb requested a review from chivee as a code owner March 4, 2020 19:54
include/LightGBM/tree.h Outdated Show resolved Hide resolved
@jameslamb jameslamb merged commit 7776cfe into microsoft:master Mar 5, 2020
@jameslamb jameslamb deleted the ci/more-cpplint branch March 25, 2020 20:01
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants