From 6acd78ef649fb321c76dbf057a74122b6f98e11d Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Mon, 22 Jul 2024 11:10:26 +0100 Subject: [PATCH 1/2] Recognise bzlmod files in checker itself --- licence-checker/licence-checker.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/licence-checker/licence-checker.py b/licence-checker/licence-checker.py index 862a7c8..31e1cba 100755 --- a/licence-checker/licence-checker.py +++ b/licence-checker/licence-checker.py @@ -149,7 +149,17 @@ def full_line_parts(self, licence_line): ([".proto"], SLASH_SLASH), # Protobuf # Software Build Systems (["meson.build", "toolchain.txt", "meson_options.txt"], HASH), # Meson - (["WORKSPACE", "BUILD", "BUILD.bazel", ".bzl"], HASH), # Bazel + ( + [ + "WORKSPACE", + "WORKSPACE.bzlmod", + "MODULE.bazel", + "BUILD", + "BUILD.bazel", + ".bzl", + ], + HASH, + ), # Bazel # General Tooling ([".py"], HASH), # Python ([".sh"], HASH), # Shell Scripts From 07bc22f468ac58d8ed79a734d1b8e1de17870d56 Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Mon, 22 Jul 2024 11:11:53 +0100 Subject: [PATCH 2/2] Add license headers to bzlmod files --- MODULE.bazel | 4 ++++ WORKSPACE.bzlmod | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/MODULE.bazel b/MODULE.bazel index 935d0c9..1c4273c 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + module(name = "lowrisc_misc_linters") bazel_dep(name = "rules_python", version = "0.32.2") diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod index fc848f6..0902d0b 100644 --- a/WORKSPACE.bzlmod +++ b/WORKSPACE.bzlmod @@ -1,2 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + load("@aspect_rules_lint//lint:ruff.bzl", "fetch_ruff") fetch_ruff()