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

Unified Diff: Tools/Scripts/clean-header-guards

Issue 20652002: Fix trailing whitespace in scripts and misc. files (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Don't change literal diff. Created 7 years, 5 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 | « Tools/Scripts/check-for-weak-vtables-and-externals ('k') | Tools/Scripts/compare-timing-files » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/clean-header-guards
diff --git a/Tools/Scripts/clean-header-guards b/Tools/Scripts/clean-header-guards
index 2bad046edf27b3097fe416eadccf9712d4d031bb..848439f71af36024633378cf39f456a6c0ec0873 100755
--- a/Tools/Scripts/clean-header-guards
+++ b/Tools/Scripts/clean-header-guards
@@ -6,7 +6,7 @@ require 'optparse'
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: clean-header-guards [options]"
-
+
opts.on("--prefix [PREFIX]", "Append a header prefix to all guards") do |prefix|
options[:prefix] = prefix
end
@@ -14,16 +14,16 @@ end.parse!
IgnoredFilenamePatterns = [
# ignore headers which are known not to have guard
- /WebCorePrefix/,
+ /WebCorePrefix/,
/ForwardingHeaders/,
- %r|bindings/objc|,
+ %r|bindings/objc|,
/vcproj/, # anything inside a vcproj is in the windows wasteland
-
+
# we don't own any of these headers
%r|icu/unicode|,
%r|platform/graphics/cairo|,
%r|platform/image-decoders|,
-
+
/config.h/ # changing this one sounds scary
].freeze
@@ -32,7 +32,7 @@ IgnoreFileNamesPattern = Regexp.union(*IgnoredFilenamePatterns).freeze
Find::find(".") do |filename|
next unless filename =~ /\.h$/
next if filename.match(IgnoreFileNamesPattern)
-
+
File.open(filename, "r+") do |file|
contents = file.read
match_results = contents.match(/#ifndef (\S+)\n#define \1/s)
« no previous file with comments | « Tools/Scripts/check-for-weak-vtables-and-externals ('k') | Tools/Scripts/compare-timing-files » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698