Skip to content

Commit 5f2274e

Browse files
committed
Add license header linting job to CI
Signed-off-by: Douglas Reis <doreis@lowrisc.org>
1 parent 8a5ac70 commit 5f2274e

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Copyright lowRISC contributors.
2+
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3+
# SPDX-License-Identifier: Apache-2.0
4+
15
name: CI
26

37
on:
@@ -21,6 +25,16 @@ jobs:
2125
run: |
2226
uv sync --all-extras
2327
28+
- name: Install reuse
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y reuse
32+
33+
- name: Run reuse lint
34+
run: |
35+
reuse --version
36+
reuse lint
37+
2438
- name: Linting
2539
run: |
2640
uv run ruff check

REUSE.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-FileCopyrightText: lowRISC contributors.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
version = 1
5+
6+
[[annotations]]
7+
path = [
8+
# Auto generated lock files
9+
"*.lock",
10+
# Files that can't take a header
11+
".python-version",
12+
13+
#Test snapshots that are autognerated.
14+
"**/snapshots/*.rdl",
15+
"**/snapshots/*.sv",
16+
]
17+
precedence = "aggregate"
18+
SPDX-FileCopyrightText = "lowRISC contributors."
19+
SPDX-License-Identifier = "Apache-2.0"

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
env = pythonSet.mkVirtualEnv "python-env" workspace.deps.default;
6161
in {
6262
devShells.x86_64-linux.default = pkgs.mkShell {
63-
packages = [env pkgs.uv];
63+
packages = [env pkgs.uv pkgs.reuse];
6464
buildInputs = [peakrdl];
6565
};
6666
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;

0 commit comments

Comments
 (0)