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

dev: update .clang-tidy #1737

Merged

Conversation

shenlebantongying
Copy link
Collaborator

Fix

  • The missing comma at the head doesn't exclude many warnings
  • The comment in middle doesn't exclude warnings in the following lines

Thankfully, both leads to more warnings instead of reducing 😅

  • Remove deprecated-headers warnings -> Couldn't matter less.

  • Remove C-style cast & reinterpret_cast warnings

    • We only use them in a few places to interact with external APIs
      • The warnings are conflicting, convert C-style cast will warn reinterpret_cast is wrong or const_cast is wrong.
      • There is noway to satisfy clang-tidy.
  • Remove cppcoreguidelines-pro-bounds-array-to-pointer-decay

    • A pain of C style array, but it is not obvious what to fix when interacting with C libraries
      • just avoid them altogether is better -> cppcoreguidelines-avoid-c-arrays
  • Add a few more

  • Sort

@shenlebantongying shenlebantongying enabled auto-merge (rebase) August 28, 2024 06:22
@shenlebantongying shenlebantongying merged commit b68ea3f into xiaoyifang:staged Aug 28, 2024
7 checks passed
@shenlebantongying shenlebantongying deleted the dev/clang-tidy branch August 28, 2024 06:26
Copy link

sonarcloud bot commented Aug 28, 2024

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.

1 participant