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

Import clang-format 17 settings; style document. #8

Merged
merged 5 commits into from
Oct 6, 2023

Conversation

tanaya-mankad
Copy link
Contributor

@tanaya-mankad tanaya-mankad commented Oct 3, 2023

Description

Replace the content in this section with:

  • The motivation and context for this change (if it is not immediately clear from the title)
  • If it fixes an open issue, specify the issue number (e.g., "fixes #XXXX")
  • A summary of the behavior expected from this change
  • A description of tests performed

Author Progress Checklist:

  • Open draft pull request
    • Make title clearly understandable in a standalone change log context
    • Assign yourself the issue
    • Add at least one label
  • Make code changes (if you haven't already)
  • Self-review of code
    • My code follows the style guidelines of this project
    • I have performed a self-review of my code
    • I have added comments to my code, particularly in hard-to-understand areas
    • I have only committed the necessary changes for this fix or feature
    • I have made corresponding changes to the documentation
    • My changes generate no new warnings
    • I have ensured that my fix is effective or that my feature works as intended by:
      • exercising the code changes in the test framework, and/or
      • manually verifying the changes (as explained in the the pull request description above)
    • My changes pass all local tests
    • My changes successfully passes CI checks
  • Move pull request out of draft mode and assign reviewers
  • Iterate with reviewers until all changes are approved
    • Make changes in response to reviewer comments
    • Re-request review in GitHub

Reviewer Checklist:

  • Read the pull request description
  • Perform a code review on GitHub
  • Confirm all CI checks pass and there are no build warnings
  • Pull, build, and run automated tests locally
  • Perform manual tests of the fix or feature locally
  • Add any review comments, if applicable
  • Submit review in GitHub as either
    • Request changes, or
    • Approve
  • Iterate with author until all changes are approved
  • If you are the last reviewer to approve, merge the pull request and delete the branch

@tanaya-mankad tanaya-mankad added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 3, 2023
@tanaya-mankad tanaya-mankad self-assigned this Oct 3, 2023
Comment on lines +95 to +99
In the absence of a standard formatting tool, use the following clang-format guidelines to organize your code.

Prefer spaces to tab characters when indenting (set your text editor to replace tabs).

The following clang-format list supports all (CPP-related) tags available in Clang 17, as listed in [https://clang.llvm.org/docs/ClangFormatStyleOptions.html](https://clang.llvm.org/docs/ClangFormatStyleOptions.html)
Copy link
Member

Choose a reason for hiding this comment

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

This seems too open ended. We use the atheneum clang-format. Period. IDE's should be configured to apply formatting when a file is saved and/or we should have the CI check that formatting is applied appropriately.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good point - we need the kind of CI script that E+ runs, which fails if the formatting is wrong. I'll work on that.

NRELSolarDecathalon (vs. NrelSolarDecathalon)
```

## Variable names
Copy link
Member

Choose a reason for hiding this comment

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

Should we include references / summary of the book chapter you shared?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, definitely. This style document is an initial import only. There are lot of things to add, but I'm trying break up PRs into smaller chunks, maybe?

.clang-format Outdated
Copy link
Member

Choose a reason for hiding this comment

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

How does this compare to what is currently in Btwxt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's actually taking the btwxt one and adding the newer values captured in clang-format 17 (btwxt was only on 10).

@nealkruis nealkruis merged commit 4d2f973 into main Oct 6, 2023
10 checks passed
@nealkruis nealkruis deleted the style-and-formatting-docs branch October 6, 2023 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants