Skip to content

Improve cmake targets for code linters - #192

Open
Matt Shin (matthewrmshin) wants to merge 5 commits into
developfrom
feature/cmake-cpplint
Open

Matt Shin (matthewrmshin) wants to merge 5 commits into
developfrom
feature/cmake-cpplint

Conversation

@matthewrmshin

@matthewrmshin Matt Shin (matthewrmshin) commented Jun 8, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Modify cpplint target to use cpplint from the environment. ~Remove cpplint.py from source tree.

cpplint 2.0.2 happiness:

  • Fix build/include_what_you_use, whitespace/braces, whitespace/indent_namespace
  • Update filter categories.

Issue(s) addressed

Resolves #<issue_number>

Impact

We can use more standard cpp linting tools.

Checklist

  • I have updated the unit tests to cover the change
  • New functions are documented briefly via Doxygen comments in the code
  • I have linted my code using cpplint
  • I have run the unit tests
  • I have run mo-bundle to check integration with the rest of JEDI and run the unit tests under all environments

Modify cpplint target to use `cpplint` from the environment.
~Remove `cpplint.py` from source tree.~

cpplint 2.0.2 happiness:
- Fix build/include_what_you_use
- Update filter categories.
@twsearle

Copy link
Copy Markdown
Collaborator

Does this work have an associated issue somewhere like mo-bundle? Does it have dependencies?

It is all looking good though! Very happy to make the changes.

@matthewrmshin

Copy link
Copy Markdown
Collaborator Author

Associated mo-bundle PR is https://github.com/MetOffice/mo-bundle/pull/1098 to take full advantage. There is no inter-dependency.

@twsearle

Copy link
Copy Markdown
Collaborator

Can we take this out of draft yet? I think maybe we should remove the existing tools/cpplint.py as part of this change and use the central one in the CI as well as part of this change if possible, just for completeness?

@matthewrmshin
Matt Shin (matthewrmshin) marked this pull request as ready for review July 22, 2026 12:01

@twsearle Toby Searle (twsearle) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All looking good! Please can you git rm tools/cpplint.py and see if the CI still runs?

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

Successfully merging this pull request may close these issues.

2 participants