From ae7af92abadf7484813a80c18e29b7070b6c0201 Mon Sep 17 00:00:00 2001 From: "estade@chromium.org" Date: Fri, 27 Jan 2012 14:51:13 +0000 Subject: [PATCH] Add CSS as a source file type. this forces license headers, no line-end whitespace, etc. Also update the default license header regex to allow concluding */ on the final line. Review URL: http://codereview.chromium.org/9109001 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@119448 0039d316-1c4b-4281-b951-d872f2087c98 --- presubmit_canned_checks.py | 4 ++-- presubmit_support.py | 2 +- tests/presubmit_unittest.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index 6f7c4bafd..41fc6d192 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -1,4 +1,4 @@ -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -855,7 +855,7 @@ def PanProjectChecks(input_api, output_api, r'All rights reserved\.\n' r'.*? Use of this source code is governed by a BSD-style license that ' r'can be\n' - r'.*? found in the LICENSE file\.\n' + r'.*? found in the LICENSE file\.( \*/)?\n' ) % { 'year': input_api.time.strftime('%Y'), 'project': project_name, diff --git a/presubmit_support.py b/presubmit_support.py index f583fb67e..5bd049bcd 100755 --- a/presubmit_support.py +++ b/presubmit_support.py @@ -198,7 +198,7 @@ class InputApi(object): # Scripts r".+\.js$", r".+\.py$", r".+\.sh$", r".+\.rb$", r".+\.pl$", r".+\.pm$", # Other - r".+\.java$", r".+\.mk$", r".+\.am$", + r".+\.java$", r".+\.mk$", r".+\.am$", r".+\.css$" ) # Path regexp that should be excluded from being considered containing source diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py index a70729429..8753dc724 100755 --- a/tests/presubmit_unittest.py +++ b/tests/presubmit_unittest.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -1067,7 +1067,7 @@ class InputApiUnittest(PresubmitTestsBase): self.fake_change, './PRESUBMIT.py', False, None, False) self.mox.ReplayAll() - self.assertEqual(len(input_api.DEFAULT_WHITE_LIST), 21) + self.assertEqual(len(input_api.DEFAULT_WHITE_LIST), 22) self.assertEqual(len(input_api.DEFAULT_BLACK_LIST), 11) for item in files: results = filter(input_api.FilterSourceFile, item[0])