Skip to content
Permalink
Browse files

Add a clang-tidy settings file for all of Chromium

We want to start running tidy as a part of Tricium. In order to do so,
we need to figure out the set of clang-tidy checks we want to run.

The checks here are sourced from the 'Y' column of:
https://docs.google.com/spreadsheets/d/16_z3pQFvTEzQocfWpch54GSykziTxVJMEcaDb5xW0YA/comment#gid=0

Ignoring google-explicit-constructor and modernize-use-auto (since the
former has code that relies on it, and the latter requires changes to
clang-tidy to meet Chromium's style guidelines).

We can add more (bugprone-*, ...) as time goes on, but those appear to
be the defaults that Chromium wants initially.

Please note that subdirectories can override all of this whenever they
want (e.g., v8 has a .clang-tidy file already, so any files inside of
v8/ will entirely obey that), so this is meant to be a generally
valuable and applicable set of checks.

Teaching `gn` about all of this might have some value eventually, but
for now, the goal is to see how far we can get with the simpler
solution.

Bug: 633856
Change-Id: I7b52e6a313ace8a91e9041313b222da737ef47fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1808532
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709137}
  • Loading branch information
George Burgess IV Commit Bot
George Burgess IV authored and Commit Bot committed Oct 24, 2019
1 parent 78492cf commit 1fdfdeba764a2773375fe73ffa3b2fe5121c4b8e
Showing with 16 additions and 0 deletions.
  1. +15 −0 .clang-tidy
  2. +1 −0 OWNERS
@@ -0,0 +1,15 @@
---
---
Checks: '-*,
modernize-redundant-void-arg,
modernize-replace-random-shuffle,
modernize-shrink-to-fit,
modernize-use-bool-literals,
modernize-use-equals-default,
modernize-use-equals-delete,
modernize-use-nullptr,
modernize-use-override,
google-build-explicit-make-pair,
google-readability-casting'
...

1 OWNERS
@@ -4,6 +4,7 @@
file://ENG_REVIEW_OWNERS

per-file .clang-format=thakis@chromium.org
per-file .clang-tidy=file://styleguide/c++/OWNERS
per-file .eslintrc.js=file://tools/web_dev_style/OWNERS
per-file .gitattributes=*
per-file .gitignore=*

0 comments on commit 1fdfdeb

Please sign in to comment.
You can’t perform that action at this time.