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

Enable clang-format on existing code #1593

Merged
merged 6 commits into from
Nov 24, 2022
Merged

Enable clang-format on existing code #1593

merged 6 commits into from
Nov 24, 2022

Conversation

prasannavl
Copy link
Member

@prasannavl prasannavl commented Nov 23, 2022

/kind chore

Summary

Format with clang-format with a combination of Chromium and Microsoft styles.

Styles

  • Base style: Chromium.
  • PointerAlignment and indent widths from Microsoft.
    • Right pointeraligned provides unmistakable clarity on vars.
    • Indent width of 4 provides better readability.
  • Disable BinPacking on args to ensure attributes and the likes formatted more read-friendly.
  • AccessModifierOffset: -4 aligning with BTC (webkit standard) to be more in line with BTC - as it's a non functional decision that stands out.

Commit Structure

(each commit pushing it different units to be more helpful for review)

  • Add clang-format only
  • Adjust linters to be more conducive
  • Separate commit for the actual format
  • Add code exception blocks

Others

  • Makes lint-logs a bit more friendly to auto format.

Exceptions

Related: Supersedes #1380 and #1379.

Jouzo
Jouzo previously approved these changes Nov 23, 2022
dcorral
dcorral previously approved these changes Nov 23, 2022
@prasannavl prasannavl dismissed stale reviews from dcorral and Jouzo via c378597 November 24, 2022 08:34
@prasannavl prasannavl merged commit 25ab35d into master Nov 24, 2022
@prasannavl prasannavl deleted the pvl/clang-format branch November 24, 2022 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants