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

Clang-tidy should follow clang-format #612

Closed
wants to merge 2 commits into from

Conversation

luishfonseca
Copy link
Contributor

Checklist

  • Self-review changes.
  • Evaluate impact on the documentation.

@luishfonseca luishfonseca added A-Meta B-CI Related to CI actions B-Build Related to the build configuration labels Sep 28, 2023
@luishfonseca luishfonseca added this to the 0.0 Nursery milestone Sep 28, 2023
@luishfonseca luishfonseca self-assigned this Sep 28, 2023
@luishfonseca luishfonseca linked an issue Sep 28, 2023 that may be closed by this pull request
@github-actions
Copy link
Contributor

github-actions bot commented Sep 28, 2023

PR Preview Action v1.4.4
Preview removed because the pull request was closed.
2023-09-28 18:36 UTC

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ clang-tidy found issue(s) with the introduced code (1/1)

@@ -190,7 +190,7 @@ const void* FieldsTrait::ConstView::get(const Field& field) const

const void* FieldsTrait::ConstView::get(const std::string& name) const
{
const auto* field = mTrait.field(name);
auto field = mTrait.field(name);
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ readability-qualified-auto ⚠️
auto field can be declared as const auto *field

Suggested change
auto field = mTrait.field(name);
const auto *field = mTrait.field(name);

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (743fe69) 36.57% compared to head (4d361a2) 36.57%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #612   +/-   ##
=======================================
  Coverage   36.57%   36.57%           
=======================================
  Files          89       89           
  Lines        6367     6367           
=======================================
  Hits         2329     2329           
  Misses       4038     4038           
Files Coverage Δ
core/src/cubos/core/reflection/traits/fields.cpp 93.02% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@luishfonseca
Copy link
Contributor Author

Adding -format to run-clang-tidy formats the file after applying fixes, since our workflow doesn't auto fix this PR won't work.

@RiscadoA RiscadoA deleted the 611-clang-tidy-should-follow-clang-format branch September 28, 2023 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Meta B-Build Related to the build configuration B-CI Related to CI actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clang-tidy action suggestions are not formatted correctly
1 participant