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

Add .clang-format and .clang-tidy files #701

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

program--
Copy link
Contributor

This PR resolves #614, by adding .clang-format and .clang-tidy files. Note, this PR does not apply any formatting and only adds the files. Most likely, the state they are in is not final and will most likely change as we utilize them to better fit our needs.

The current .clang-format options are based off the NGen programming standards guide in the documentation, and from skimming the codebase.

Additionally, this PR makes a small change to .gitignore to ignore the compilation database artifact from CMake -- this is not directly related to the PR, but is small enough that I figured it wouldn't be an issue including in this.

Additions

  • .clang-format file
  • .clang-tidy file
  • Adds compile_commands.json to .gitignore

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

@program-- program-- added the enhancement New feature or request label Jan 10, 2024
@program-- program-- self-assigned this Jan 10, 2024
@@ -98,6 +98,7 @@ CMakeCache.txt
/cmake_build
/build
/cmake_build*
compile_commands.json
Copy link
Member

Choose a reason for hiding this comment

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

Is this a file generated by the tooling?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a compilation db file, it's generated by CMake if -DCMAKE_EXPORT_COMPILE_COMMANDS=ON but clangd does use it for indexing.

@hellkite500 hellkite500 merged commit 52f4354 into NOAA-OWP:master Jan 25, 2024
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.

Add a clang-format configuration file
2 participants