8000 [clang-tidy] autofix cppcoreguidelines by dmah42 · Pull Request #1932 · google/benchmark · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[clang-tidy] autofix cppcoreguidelines #1932

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

Merged
merged 5 commits into from
Feb 12, 2025
Merged

[clang-tidy] autofix cppcoreguidelines #1932

merged 5 commits into from
Feb 12, 2025

Conversation

dmah42
Copy link
Member
@dmah42 dmah42 commented Feb 12, 2025

part of #1925

@@ -1692,7 +1692,7 @@ class BENCHMARK_EXPORT BenchmarkReporter {
CPUInfo const& cpu_info;
SystemInfo const& sys_info;
// The number of chars in the longest benchmark name.
size_t name_field_width;
size_t name_field_width{};
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should probably be =0;

Copy link
Member Author

Choose a reason for hiding this comment

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

it would be nice if clang-tidy followed published guidelines (https://abseil.io/tips/88 and https://abseil.io/tips/146). i'll redo the automation here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

There is probably a configuration knob for that, i'd guess. Or maybe not.

Copy link
Member Author

Choose a reason for hiding this comment

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

so it should now be using the config in .clang-format (which it wasn't before, so it should be a bit more consistent. hopefully.

LebedevRI
LebedevRI previously approved these changes Feb 12, 2025
Copy link
Collaborator
@LebedevRI LebedevRI left a comment

Choose a reason for hiding this comment

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

Generally really not a fan of zero-init (since it hides genuine issues),
but seems harmless in these cases.

@dmah42 dmah42 merged commit 2d4c8dd into main Feb 12, 2025
97 of 101 checks passed
@dmah42 dmah42 deleted the cppcoreguidelines branch February 12, 2025 19:32
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.

2 participants
0