History log of /fuchsia/.clang-tidy (Results 1 – 15 of 15)
Revision Date Author Comments
# 6fcfa200 24-Aug-2021 David Greenaway

[clang-tidy] Disable "readability-identifier-length" rule.

It has too many false positives, and we can trust human code reviewers
to check readability.

Change-Id: Icaf33f37e4a3a5cd179c669fc6c6d891c

[clang-tidy] Disable "readability-identifier-length" rule.

It has too many false positives, and we can trust human code reviewers
to check readability.

Change-Id: Icaf33f37e4a3a5cd179c669fc6c6d891c702b442
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/572801
Fuchsia-Auto-Submit: David Greenaway <dgreenaway@google.com>
Reviewed-by: Petr Hosek <phosek@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>

show more ...


# 375a58c8 19-Aug-2021 Aaron Green

[clang-tidy] Disable 'readability-named-parameter'

This CL disables 'readability-named-parameter', which triggers with
false positives on the GoogleTest macros.

Change-Id: Ie645e65cbd03c49fa09a89a9

[clang-tidy] Disable 'readability-named-parameter'

This CL disables 'readability-named-parameter', which triggers with
false positives on the GoogleTest macros.

Change-Id: Ie645e65cbd03c49fa09a89a94b7da969ee55d800
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/571388
Commit-Queue: Aaron Green <aarongreen@google.com>
Reviewed-by: Petr Hosek <phosek@google.com>

show more ...


# 3de42ee5 19-Aug-2021 Aaron Green

[clang-tidy] Disable 'readability-identifier-length'

The 'readability-identifier-length' clang-tidy rule fires for any
identifiers of less than 3 characters. There are a number of such
identifiers t

[clang-tidy] Disable 'readability-identifier-length'

The 'readability-identifier-length' clang-tidy rule fires for any
identifiers of less than 3 characters. There are a number of such
identifiers that may be considered valid, such as counters ("i"),
explicit object identifiers ("id"), registers ("pc"), etc. To
avoid noisy false positives, this CL disables this newly added rule
in favor of using code-review to ensure proper naming.

Change-Id: I374431d6cbc9c69345ddc299731abec4272168f9
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/571387
Reviewed-by: Petr Hosek <phosek@google.com>
Commit-Queue: Aaron Green <aarongreen@google.com>

show more ...


# fb05f803 19-Oct-2020 David Greenaway

[clang-tidy] Disable "readability-function-cognitive-complexity".

This new warning was enabled in a recent toolchain roll.

The warning has a low signal to noise ratio, and doesn't take into
account

[clang-tidy] Disable "readability-function-cognitive-complexity".

This new warning was enabled in a recent toolchain roll.

The warning has a low signal to noise ratio, and doesn't take into
account complexity hidden inside macros.

Let's trust our code review process instead.

Change-Id: Iddb87a7a0903876c370b417c6c02e26bcb7db955
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/440815
Reviewed-by: Joshua Seaton <joshuaseaton@google.com>
Commit-Queue: David Greenaway <dgreenaway@google.com>

show more ...


# 4032b104 16-Jun-2020 David Greenaway

[clang-tidy] Disable noisy checks from clang-tidy list.

Running clang-tidy over an entire "//products/core.gni" build on ARM
(excluding third_party code), we get roughly 34,384 clang-tidy warnings.

[clang-tidy] Disable noisy checks from clang-tidy list.

Running clang-tidy over an entire "//products/core.gni" build on ARM
(excluding third_party code), we get roughly 34,384 clang-tidy warnings.

The top 10 warnings by category are as follows [*]:

8860 readability-magic-numbers
5760 modernize-avoid-c-arrays
3721 misc-unused-parameters
2326 readability-qualified-auto
1060 modernize-use-auto
973 performance-unnecessary-value-param
915 google-readability-casting
820 readability-convert-member-functions-to-static
637 readability-else-after-return
509 modernize-concat-nested-namespaces

The top 5 of these represent about two-thirds of clang-tidy warnings,
and --- while often good advice --- are triggered often enough that they
hide more valuable signals (especially the clang-tidy bugprone-*
warnings), or cause users to disable clang-tidy completely (c.f.,
Ie421af84b18385ef77864a429bb1f5d535dbd78a).

Disable the 5 most noisy warnings to increase the signal-to-noise ratio of
clang-tidy. Instead, trust code authors and reviewers to make sensible
decisions about readability.

[*] I've omitted 3,908 "bugprone-macro-parentheses" warnings, because the
warning triggers for every file. This is because a parameter of the form
"-DFOO=A-B" is passed into the compiler, which is treated as a macro
of the form "#define FOO A-B", and seens as a bad macro by clang-tidy.

Change-Id: I184f67c0d13b44cc4a1e546e027190386164d8f4
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/397958
Testability-Review: David Greenaway <dgreenaway@google.com>
Reviewed-by: Petr Hosek <phosek@google.com>
Commit-Queue: David Greenaway <dgreenaway@google.com>

show more ...


# 862439f1 29-May-2020 Adam MacBeth

[clang-tidy] Remove google-runtime-references check

The prohibition on mutable reference parameters has been removed from
the style guide, so remove it here.

Change-Id: I1c0fc382fd448fd608fed3491db

[clang-tidy] Remove google-runtime-references check

The prohibition on mutable reference parameters has been removed from
the style guide, so remove it here.

Change-Id: I1c0fc382fd448fd608fed3491db96f84e5e5314e
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/393725
Reviewed-by: Petr Hosek <phosek@google.com>
Testability-Review: Adam Barth <abarth@google.com>
Commit-Queue: Adam MacBeth <amacbeth@google.com>

show more ...


# fd7d14ec 03-Sep-2019 Gabriel Kerneis

[clang-tidy] Enable modernize-use-emplace.IgnoreImplicitConstructors

This avoids warning on cases allowed by https://abseil.io/tips/112.

Change-Id: Id4716dae5b444f2a8e5f0d2acde1da0ffed68d0b


# cadf8696 13-Aug-2019 Julie Hockett

[clang-tidy] Disable modernize-use-nodiscard

Sometimes [[nodiscard]] can be useful but writing this for every single getter
isn't something that Fuchisa code generally follows.

Change-Id: I0fd8c13c

[clang-tidy] Disable modernize-use-nodiscard

Sometimes [[nodiscard]] can be useful but writing this for every single getter
isn't something that Fuchisa code generally follows.

Change-Id: I0fd8c13c3c395d179bf00354d58395ea9a599bf1

show more ...


# 0dfc7f95 16-Jul-2019 David Greenaway

[clang-tidy] Allow structs with public members.

The check "misc-non-private-member-variables-in-classes" currently
disallows struct and classes which public fields if they have at least
one method o

[clang-tidy] Allow structs with public members.

The check "misc-non-private-member-variables-in-classes" currently
disallows struct and classes which public fields if they have at least
one method on them. For example, the following is disallowed:

struct Foo {
int a;
int b;
int c;

string ToString() const;
};

This is perhaps more drastic than intended. Switch the option
"misc-non-private-member-variables-in-classes" to only disallow public
fields on structs and classes if at least one field is private.

Change-Id: Ifbb98e95291e8e10084459249a500b6d79503383

show more ...


# 46f91fe8 28-Jun-2019 Julie Hockett

[fx] Fix clang-tidy invocation

Explicitly avoid including any additional flags in the clang-tidy
invocation if --fix is not passed. clang-tidy interprets the empty
string as "run on all the files",

[fx] Fix clang-tidy invocation

Explicitly avoid including any additional flags in the clang-tidy
invocation if --fix is not passed. clang-tidy interprets the empty
string as "run on all the files", which is incorrect.

Also remove the header filter, so that only corresponding header errors
are reported (e.g. for "foo.cpp", only errors from "foo.h" will be
reported, instead of all errors in all headers "foo.cpp" might include.

Bug: DX-1709
Change-Id: I249e78ed0ff4765ea235dbe8d2c1b065447279d7

show more ...


# d98e158f 10-Jun-2019 Adam MacBeth

[clang-tidy] Fix syntax causing check line to be missed

Without the comma at the end of -readability-uppercase-literal-suffix line, this check is not excluded.

Change-Id: I8f52f6f45999684f667786755

[clang-tidy] Fix syntax causing check line to be missed

Without the comma at the end of -readability-uppercase-literal-suffix line, this check is not excluded.

Change-Id: I8f52f6f45999684f6677867550bacd4397e81289

show more ...


# 863002c6 07-Jun-2019 David Greenaway

[clang-tidy] Disable "modernize-use-trailing-return-type"

The ClangTidy check seems to be advocating a stylistic change:

int foo() {
// ...
}

into

auto foo() -> int {
// ...
}

Ou

[clang-tidy] Disable "modernize-use-trailing-return-type"

The ClangTidy check seems to be advocating a stylistic change:

int foo() {
// ...
}

into

auto foo() -> int {
// ...
}

Our current codebase extensively uses the first style, meaning the
recommendation is very noisy. Disable it for now.

c.f. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-trailing-return-type.html

Change-Id: I126ba0d6d769ad7f9cdd3c238629f84c3bc28eef

show more ...


# 2dfd2e76 30-May-2019 Julie Hockett

[clang-tidy] Enable modernize-use-equals-default and
performance-unnecessary-value-pararm

As requested, if they are not useful they will be disabled.

Bug: TC-511 #done
Bug: TC-510 #done
Change-Id:

[clang-tidy] Enable modernize-use-equals-default and
performance-unnecessary-value-pararm

As requested, if they are not useful they will be disabled.

Bug: TC-511 #done
Bug: TC-510 #done
Change-Id: Ic62a8a5315295f91bbc41997acddfea0afa55e8f

show more ...


# 086e2916 24-May-2019 Julie Hockett

[clang-tidy] Update checks and documentation

Disables two readability checks deemed unnecessary and re-enables
modernize-use-auto on request. Also disables clang-analyzer-* checks due
to numerous fa

[clang-tidy] Update checks and documentation

Disables two readability checks deemed unnecessary and re-enables
modernize-use-auto on request. Also disables clang-analyzer-* checks due
to numerous false positive issues, which will be investigated and
possibly re-enabled in the future.

Bug: FIDL-643
Change-Id: If8521f9235282eb13465360f5ddf7dd89eea853e

show more ...


# 55732b75 17-May-2019 Julie Hockett

[clang-tidy][fx] Add clang-tidy script to fx

This creates a top-level .clang-tidy file and adds a script to fx to run
the clang-tidy tool over a given set of targets or files.

It also removes the /

[clang-tidy][fx] Add clang-tidy script to fx

This creates a top-level .clang-tidy file and adds a script to fx to run
the clang-tidy tool over a given set of targets or files.

It also removes the //peridot/.clang-tidy, //zircon/.clang-tidy and
//src/ledger/.clang-tidy files, as they are now redundant (and we want
uniform enforcement across the project).

Bug: TC-426
Change-Id: Icc98696a79dc320007f7356d91e324ba75ae452f

show more ...