diff --git a/PRESUBMIT.py b/PRESUBMIT.py index c7c05c968f3..fb77174229b 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -342,10 +342,12 @@ def _CheckDevToolsPythonLikeFileLicenseHeaders(input_api, output_api): 'test') scripts_directory = input_api.os_path.join(input_api.PresubmitLocalPath(), 'scripts') + config_directory = input_api.os_path.join(input_api.PresubmitLocalPath(), + 'config') default_linted_directories = [ front_end_directory, test_directory, scripts_directory, - inspector_overlay_directory + inspector_overlay_directory, config_directory ] check_related_files = [lint_path] @@ -355,7 +357,7 @@ def _CheckDevToolsPythonLikeFileLicenseHeaders(input_api, output_api): should_bail_out, files_to_lint = _getFilesToLint( input_api, output_api, lint_config_files, default_linted_directories, - ['BUILD.gn'], results) + ['BUILD.gn', '.gni'], results) if should_bail_out: return results diff --git a/scripts/build/ninja/copy.gni b/scripts/build/ninja/copy.gni index e9911f1718e..eab71c5310c 100644 --- a/scripts/build/ninja/copy.gni +++ b/scripts/build/ninja/copy.gni @@ -1,9 +1,9 @@ -# Copyright 2019 The Chromium Authors. All rights reserved. +# Copyright 2021 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. + import("./node.gni") import("./vars.gni") - template("copy_to_gen") { node_action(target_name) { forward_variables_from(invoker, diff --git a/scripts/build/ninja/devtools_entrypoint.gni b/scripts/build/ninja/devtools_entrypoint.gni index 96353864944..2f24b84095e 100644 --- a/scripts/build/ninja/devtools_entrypoint.gni +++ b/scripts/build/ninja/devtools_entrypoint.gni @@ -1,4 +1,4 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. +# Copyright 2021 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. diff --git a/scripts/build/ninja/devtools_module.gni b/scripts/build/ninja/devtools_module.gni index b6d2e780add..b3e4e6f2e8a 100644 --- a/scripts/build/ninja/devtools_module.gni +++ b/scripts/build/ninja/devtools_module.gni @@ -1,4 +1,4 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. +# Copyright 2021 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. diff --git a/scripts/build/ninja/devtools_pre_built.gni b/scripts/build/ninja/devtools_pre_built.gni index 4565427132e..524e7a5c4b5 100644 --- a/scripts/build/ninja/devtools_pre_built.gni +++ b/scripts/build/ninja/devtools_pre_built.gni @@ -1,4 +1,4 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. +# Copyright 2021 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. diff --git a/scripts/build/ninja/node.gni b/scripts/build/ninja/node.gni index f25e391b27f..b99727a28e3 100644 --- a/scripts/build/ninja/node.gni +++ b/scripts/build/ninja/node.gni @@ -1,4 +1,4 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. +# Copyright 2021 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. diff --git a/scripts/build/ninja/rollup.gni b/scripts/build/ninja/rollup.gni index fb1d4e0b5fd..4326e1bcd61 100644 --- a/scripts/build/ninja/rollup.gni +++ b/scripts/build/ninja/rollup.gni @@ -1,4 +1,4 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. +# Copyright 2021 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. diff --git a/scripts/build/ninja/vars.gni b/scripts/build/ninja/vars.gni index 53d986dca8f..7933c23f35b 100644 --- a/scripts/build/ninja/vars.gni +++ b/scripts/build/ninja/vars.gni @@ -1,4 +1,4 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. +# Copyright 2021 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. diff --git a/scripts/test/run_header_check_python_like_files.js b/scripts/test/run_header_check_python_like_files.js index abf5a705c22..0fc343f709d 100644 --- a/scripts/test/run_header_check_python_like_files.js +++ b/scripts/test/run_header_check_python_like_files.js @@ -15,6 +15,7 @@ const FRONT_END_DIRECTORY = path.join(ROOT_DIRECTORY, 'front_end'); const TEST_DIRECTORY = path.join(ROOT_DIRECTORY, 'test'); const SCRIPTS_DIRECTORY = path.join(ROOT_DIRECTORY, 'scripts'); const INSPECTOR_OVERLAY_DIRECTORY = path.join(ROOT_DIRECTORY, 'inspector_overlay'); +const CONFIG_DIRECTORY = path.join(ROOT_DIRECTORY, 'config'); const CURRENT_YEAR = new Date().getFullYear(); const LINE_LICENSE_HEADER = [ @@ -76,8 +77,8 @@ let filesToLint = process.argv.slice(2); if (filesToLint.length === 0) { const topLevelDirectories = - [FRONT_END_DIRECTORY, SCRIPTS_DIRECTORY, TEST_DIRECTORY, INSPECTOR_OVERLAY_DIRECTORY].join(','); - filesToLint = glob.sync(`{${topLevelDirectories}}/**/BUILD.gn`); + [FRONT_END_DIRECTORY, SCRIPTS_DIRECTORY, TEST_DIRECTORY, INSPECTOR_OVERLAY_DIRECTORY, CONFIG_DIRECTORY].join(','); + filesToLint = glob.sync(`{${topLevelDirectories}}/**/{BUILD.gn,*.gni}`); } for (const fileLocation of filesToLint) {