I remove the alias altogether because it appears inconsistent with the
style guide: "Don't put an alias in your public API just to save typing
in the implementation; do so only if you intend it to be used by your
clients." (https://google.github.io/styleguide/cppguide.html#Aliases).
Bug: 45
Change-Id: Ie9878250ca34387241d70d4261e9269147d8dcb6
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/68084
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Ted Pudlik <tpudlik@google.com>
This is a no-op change: I switch from excluding certain modernize-
checks to explicitly including. I think this is clearer (since it shows
what we actually enforce). The list was generated using `clang-tidy
-list-checks`.
Bug: 45
Change-Id: Ie477d330ca2a2867f8f2edafb865d489478cf562
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66900
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Ted Pudlik <tpudlik@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
This check verifies that the parameter names used in the function
declarations and definitions match. The fix involves changing either the
declaration or the definition; I chose to do one or the other on a case
by case basis. My guiding principles were (1) use the same names for
the same parameter in different functions in the same header, and (2)
generally prefer to retain the name in the header over that in the
source file (since it's more public), especially if that name also
appears in a documenting comment on the function.
Bug: 45
No-Docs-Update-Reason: clang-tidy change only.
Change-Id: I1f1c8b421923e0ef692086138ea8df0a7d5d11c3
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66640
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Ted Pudlik <tpudlik@google.com>
These checks are all fast, worthwhile, and currently pass.
Also update comment in static_analysis_toolchain.gni.
Runtime impact: On my workstation I ran,
for i in 1 2 3;
do gn clean out; gn gen out; time ninja -C out static_analysis;
done
with and without this change. The mean CPU time (user+sys) increased by
about 25%, from 559 s to 707 s. I think this is acceptable.
No-Docs-Update-Reason: We do not currently discuss in the documentation which clang-tidy checks are run for upstream pigweed itself.
Change-Id: If28652ecbd3ca6c876e6942d08d24a30717e8294
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66440
Commit-Queue: Ted Pudlik <tpudlik@google.com>
Reviewed-by: Rob Mohr <mohrr@google.com>
Reviewed-by: Armando Montanez <amontanez@google.com>
- Implement workarounds to fix system include paths in
generated compile_commands.json files: clang-tidy is otherwise
often unable to find some system headers.
- Add basic .clang-tidy configuration
- To run the pass in pigweed presubmits:
pw presubmit --step clang_tidy
pw presubmit -p other_checks
Bug: 45
No-Docs-Update-Reason: Fix in internal API
Change-Id: I3f6cae98bfecaff86543804b28083bf304ad6a60
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55000
Commit-Queue: Henri Chataing <henrichataing@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>