diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-22 20:25:11 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-22 20:25:11 +0000 |
commit | 297dc3d62b7226c9fca6b31244b35c328afd029e (patch) | |
tree | f3407da271c1e4d95f45883834a8c6d21937ea0a /tools | |
parent | da4d4ea88f1d11c3b100dcdd24f19e329615aa38 (diff) | |
download | chromium_src-297dc3d62b7226c9fca6b31244b35c328afd029e.zip chromium_src-297dc3d62b7226c9fca6b31244b35c328afd029e.tar.gz chromium_src-297dc3d62b7226c9fca6b31244b35c328afd029e.tar.bz2 |
style plugin: Don't ignore style warnings on the linux clang trybots.
Two parts:
1.) Let the banned_directories_ require full directory matches, not
just suffixes.
2.) Remove "clang" from banned_directories_. Now that mac builds just
go into xcodebuild / out, it's no longer required.
Regressed in http://codereview.chromium.org/7824047
BUG=97452
TEST=Try jobs to linux_clang report style problems again.
tools/clang/plugin/tests/test.sh passes again.
Review URL: http://codereview.chromium.org/7980045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102344 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r-- | tools/clang/plugins/ChromeClassTester.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/clang/plugins/ChromeClassTester.cpp b/tools/clang/plugins/ChromeClassTester.cpp index 927c655..30a5010a 100644 --- a/tools/clang/plugins/ChromeClassTester.cpp +++ b/tools/clang/plugins/ChromeClassTester.cpp @@ -54,7 +54,6 @@ void ChromeClassTester::BuildBannedLists() { banned_directories_.push_back("llvm/"); banned_directories_.push_back("ninja/"); banned_directories_.push_back("xcodebuild/"); - banned_directories_.push_back("clang/"); // You are standing in a mazy of twisty dependencies, all resolved by // putting everything in the header. @@ -233,8 +232,14 @@ bool ChromeClassTester::InBannedDirectory(SourceLocation loc) { it != banned_directories_.end(); ++it) { // If we can find any of the banned path components in this path, then // this file is rejected. - if (b.find(*it) != std::string::npos) - return true; + size_t index = b.find(*it); + if (index != std::string::npos) { + bool matches_full_dir_name = index == 0 || b[index - 1] == '/'; + if ((*it)[0] == '/') + matches_full_dir_name = true; + if (matches_full_dir_name) + return true; + } } } |