Skip to content

Commit 1fbecd6

Browse files
committed
Add license header linting job in CI
Signed-off-by: Douglas Reis <[email protected]>
1 parent 8a5ac70 commit 1fbecd6

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

.github/workflows/ci.yml

Lines changed: 12 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,14 @@ 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: reuse lint
35+
2436
- name: Linting
2537
run: |
2638
uv run ruff check

REUSE.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
"flake.lock",
10+
"uv.lock",
11+
# Files that can't take a header
12+
".python-version",
13+
14+
#Test snapshots that are autognerated.
15+
"**/snapshots/*.rdl",
16+
"**/snapshots/*.sv",
17+
]
18+
precedence = "aggregate"
19+
SPDX-FileCopyrightText = "lowRISC contributors."
20+
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)