Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Unified Diff: tools/gn/c_include_iterator.cc

Issue 1411573002: Handle Mozilla license blocks in the GN header checker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/gn/c_include_iterator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/c_include_iterator.cc
diff --git a/tools/gn/c_include_iterator.cc b/tools/gn/c_include_iterator.cc
index 9e719c740929b261fde2bae8e39f057feddedbdf..120295ea41650c04fe7edef6363bebc4f74b771a 100644
--- a/tools/gn/c_include_iterator.cc
+++ b/tools/gn/c_include_iterator.cc
@@ -48,6 +48,8 @@ base::StringPiece TrimLeadingWhitespace(const base::StringPiece& str) {
bool ShouldCountTowardNonIncludeLines(const base::StringPiece& line) {
if (StartsWith(line, "//"))
return false; // Don't count comments.
+ if (StartsWith(line, "/*") || StartsWith(line, " *"))
+ return false; // C-style comment blocks with stars along the left side.
if (StartsWith(line, "#"))
return false; // Don't count preprocessor.
if (base::ContainsOnlyChars(line, base::kWhitespaceASCII))
« no previous file with comments | « no previous file | tools/gn/c_include_iterator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698