From 45847bd125310de4ca2448c7dd80f5cf7afdcfcf Mon Sep 17 00:00:00 2001 From: "iposva@chromium.org" Date: Wed, 17 Sep 2008 08:47:50 +0000 Subject: [PATCH] - Rename flags.defs to flag-definitions.h. - Add better support for ignoring files in the presubmit tool. Review URL: http://codereview.chromium.org/3082 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/{flags.defs => flag-definitions.h} | 0 src/flags.cc | 6 +++--- src/flags.h | 2 +- tools/presubmit.py | 9 ++++++++- 4 files changed, 12 insertions(+), 5 deletions(-) rename src/{flags.defs => flag-definitions.h} (100%) mode change 100755 => 100644 diff --git a/src/flags.defs b/src/flag-definitions.h old mode 100755 new mode 100644 similarity index 100% rename from src/flags.defs rename to src/flag-definitions.h diff --git a/src/flags.cc b/src/flags.cc index 3b480213d..73bb8556d 100644 --- a/src/flags.cc +++ b/src/flags.cc @@ -36,11 +36,11 @@ namespace v8 { namespace internal { // Define all of our flags. #define FLAG_MODE_DEFINE -#include "flags.defs" +#include "flag-definitions.h" // Define all of our flags default values. #define FLAG_MODE_DEFINE_DEFAULTS -#include "flags.defs" +#include "flag-definitions.h" namespace { @@ -143,7 +143,7 @@ struct Flag { Flag flags[] = { #define FLAG_MODE_META -#include "flags.defs" +#include "flag-definitions.h" }; const size_t num_flags = sizeof(flags) / sizeof(*flags); diff --git a/src/flags.h b/src/flags.h index bad0d2619..813ea95ce 100644 --- a/src/flags.h +++ b/src/flags.h @@ -33,7 +33,7 @@ namespace v8 { namespace internal { // Declare all of our flags. #define FLAG_MODE_DECLARE -#include "flags.defs" +#include "flag-definitions.h" // The global list of all flags. class FlagList { diff --git a/tools/presubmit.py b/tools/presubmit.py index aa2c6b8dc..65812eccd 100755 --- a/tools/presubmit.py +++ b/tools/presubmit.py @@ -134,6 +134,12 @@ class CppLintProcessor(SourceFileProcessor): return (super(CppLintProcessor, self).IgnoreDir(name) or (name == 'third_party')) + IGNORE_LINT = ['flag-definitions.h'] + + def IgnoreFile(self, name): + return (super(CppLintProcessor, self).IgnoreFile(name) + or (name in CppLintProcessor.IGNORE_LINT)) + def GetPathsToSearch(self): return ['src', 'public', 'samples', join('test', 'cctest')] @@ -168,7 +174,8 @@ class SourceProcessor(SourceFileProcessor): or (name == 'third_party') or (name == 'obj')) - IGNORE_COPYRIGHTS = ['earley-boyer.js', 'raytrace.js', 'crypto.js'] + IGNORE_COPYRIGHTS = ['earley-boyer.js', 'raytrace.js', 'crypto.js', + 'libraries.cc', 'libraries-empty.cc'] IGNORE_TABS = IGNORE_COPYRIGHTS + ['unicode-test.js', 'html-comments.js'] -- 2.34.1