Lines Matching +refs:clang +refs:format +refs:style
3 Android C/C++ source files can be checked by clang-tidy for issues like
4 coding style, error-prone/performance patterns, and static flow analysis.
6 [clang-tidy document](https://clang.llvm.org/extra/clang-tidy)
8 [clang-tidy checks](https://clang.llvm.org/extra/clang-tidy/checks/list.html).
12 The simplest way to enable clang-tidy checks is
18 This will turn on the global default to run clang-tidy for every required
19 C/C++ source file compilation. The global default clang-tidy checks
26 The default global clang-tidy checks and flags are defined in
30 ## Module clang-tidy properties
38 clang-tidy is enabled explicitly and with a different check list:
48 "clang-analyzer-security*",
55 the modules that use `bpf_cc_defaults` _should_ run clang-tidy
58 However since clang-tidy warnings and its runtime cost might
62 To run clang-tidy on all modules that should be tested with clang-tidy,
65 Note that `clang-analyzer-security*` is included in `tidy_checks`
66 but not all `clang-analyzer-*` checks. Check `cert-err34-c` is
69 Some modules might want to disable clang-tidy even when
91 Note that `tidy:false` always disables clang-tidy, no matter
97 If a C/C++ module wants to be free of certain clang-tidy warnings,
101 has enabled clang-tidy explicitly, selected its own tidy checks,
111 "clang-analyzer-security*",
116 "clang-analyzer-security*",
125 Extra clang-tidy flags can be passed with the `tidy_flags` property.
128 to clang-tidy. This usage should now be replaced with the
131 Some other tidy flags examples are `-format-style=` and `-header-filter=`
156 "-format-style=file",
162 have clang-tidy enabled, but not for generated source
164 The clang-tidy is called with extra flags to specify the
165 format-style and header-filter.
168 include only the module directory. So, the default clang-tidy
179 Setting `WITH_TIDY=1` is easy to enable clang-tidy globally for any build.
183 their files with clang-tidy and wish to build other Android components as
187 To manually select only some directories or modules to compile with clang-tidy,
200 that are not needed by the `droid` target will be passed to clang-tidy
203 files of those modules are compiled with clang-tidy.
209 used to test if all source files compile with a new clang-tidy release.
217 Many of such *variant* flags have little or no effect on clang-tidy
218 checks. To reduce clang-tidy check time, a *subset* target like
227 ## Limit clang-tidy runtime
230 with clang-tidy, with or without the clang-analyzer checks.
231 To limit clang-tidy time, an environment variable can be set as
241 with clang-tidy. Files listed in `tidy_timeout_srcs` will not
242 be compiled by clang-tidy when `TIDY_TIMEOUT` is defined.
245 For developers who want to find all clang-tidy warnings and
254 * The global `WITH_TIDY=1` variable will enable clang-tidy for all C/C++
258 clang-tidy, so it should work for any clang-tidy invocation.
260 * The clang-tidy module level properties are defined for Android.bp modules.