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

Make CMake linter line length configurable #235

Merged
merged 2 commits into from
Jan 26, 2021
Merged

Conversation

cottsay
Copy link
Contributor

@cottsay cottsay commented May 6, 2020

I modeled as much of the change as I could after what was done in the upstream code: https://github.com/richq/cmake-lint/commits/master

After that, I just added an arg to our main.py to expose it from our CMake logic like the other linters that can take a line length argument.

Signed-off-by: Scott K Logan <logans@cottsay.net>
@cottsay cottsay added the enhancement New feature or request label May 6, 2020
@cottsay cottsay self-assigned this May 6, 2020
@mm318
Copy link
Member

mm318 commented Jan 26, 2021

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@mm318
Copy link
Member

mm318 commented Jan 26, 2021

Retrying CI after merging latest master:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@mm318
Copy link
Member

mm318 commented Jan 26, 2021

Retrying macOS CI:

  • macOS Build Status

EDIT: Unstable test failure related to ros2/rclpy#666, unrelated to this change.

@@ -70,6 +73,8 @@ def main(argv=sys.argv[1:]):
# invoke cmake lint
cmakelint._lint_state.config = cmakelint._DEFAULT_CMAKELINTRC
cmakelint._lint_state.SetFilters(args.filters)
if args.linelength is not None:
cmakelint._lint_state.SetLineLength(str(args.linelength))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of strange that we're casting from int to str and then back to int, but it should be fine.

@mm318 mm318 merged commit 717ea12 into master Jan 26, 2021
@delete-merged-branch delete-merged-branch bot deleted the cmake_linelength_arg branch January 26, 2021 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants