Commit 297dc3d6 authored by thakis@chromium.org's avatar thakis@chromium.org

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
parent da4d4ea8
...@@ -54,7 +54,6 @@ void ChromeClassTester::BuildBannedLists() { ...@@ -54,7 +54,6 @@ void ChromeClassTester::BuildBannedLists() {
banned_directories_.push_back("llvm/"); banned_directories_.push_back("llvm/");
banned_directories_.push_back("ninja/"); banned_directories_.push_back("ninja/");
banned_directories_.push_back("xcodebuild/"); banned_directories_.push_back("xcodebuild/");
banned_directories_.push_back("clang/");
// You are standing in a mazy of twisty dependencies, all resolved by // You are standing in a mazy of twisty dependencies, all resolved by
// putting everything in the header. // putting everything in the header.
...@@ -233,8 +232,14 @@ bool ChromeClassTester::InBannedDirectory(SourceLocation loc) { ...@@ -233,8 +232,14 @@ bool ChromeClassTester::InBannedDirectory(SourceLocation loc) {
it != banned_directories_.end(); ++it) { it != banned_directories_.end(); ++it) {
// If we can find any of the banned path components in this path, then // If we can find any of the banned path components in this path, then
// this file is rejected. // this file is rejected.
if (b.find(*it) != std::string::npos) size_t index = b.find(*it);
return true; 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;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment