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] Run 'cmakelint' in CI #4602

Closed
jameslamb opened this issue Sep 9, 2021 · 1 comment · Fixed by #4801
Closed

[ci] Run 'cmakelint' in CI #4602

jameslamb opened this issue Sep 9, 2021 · 1 comment · Fixed by #4801

Comments

@jameslamb
Copy link
Collaborator

Summary

LightGBM's continuous integration (CI) should use cmakelint to enforce consistency in the formatting of CMakeLists.txt.

Motivation

Following this tool's recommendations should make CMakeLists.txt a bit easier to read and maintain, by enforcing consistency in formatting.

You can run cmakelint --filter to see a list of the supported checks.

convention/filename
linelength
package/consistency
readability/logic
readability/mixedcase
readability/wonkycase
syntax
whitespace/eol
whitespace/extra
whitespace/indent
whitespace/mismatch
whitespace/newline
whitespace/tabs

Description

Similar to the approach taken in LightGBM with cpplint (#1990) and mypy (#3867), for a time these checks might be run in continuous integration without blocking merges, just as extra information about the state of the code.

How to Contribute

To contribute to this issue, run the following commands

pip install --upgrade cmakelint
cmakelint --linelength=120

Make a pull request that addresses some of the warnings. In the pull request description, list the specific warnings your changes address.

Small, focused pull requests are appreciate. Do not try to fix all of the warnings in a single PR.

References

@github-actions
Copy link

This issue 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 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant