Skip to content

Commit 1457c18

Browse files
change to use reuse tooling for copyright and license compliance
commit does the following: * remove old pre-commit for copyright/license header annotation * add reuse lint check for compliance * fix old header formats on files * and new reuse headers to files that were missing them * add github action to check for compliance * add pre-commit hook to run reuse lint to check compliance * add reuse badge to README related to rivosinc#5 Signed-off-by: Kevin Broch <kbroch@rivosinc.com>
1 parent 4ca2075 commit 1457c18

33 files changed

+180
-251
lines changed

.clang-format

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2023 Rivos Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
15
# Based off Open Titan's
26
BasedOnStyle: Google
37
AllowShortIfStatementsOnASingleLine: false

.github/workflows/reuse.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-FileCopyrightText: 2023 Rivos Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: reuse
6+
7+
on: [push, pull_request]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: reuse Compliance Check
15+
uses: fsfe/reuse-action@v1

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
# SPDX-FileCopyrightText: 2023 Rivos Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
15
.vscode

.gitlab-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2023 Rivos Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
15
include:
26
# https://gitlab.ba.rivosinc.com/rv/group_gitlab_config/raw/rivos/main/ci_includes/pre-commit-lint.yml
37
- project: 'rv/group_gitlab_config'

.pre-commit-config.yaml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2023 Rivos Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
15
repos:
26
# pull mirror from: https://github.com/pre-commit/pre-commit-hooks
37
- repo: https://gitlab.ba.rivosinc.com/pub/it/pre-commit-hooks.git
@@ -40,22 +44,12 @@ repos:
4044
hooks:
4145
- id: yapf
4246

43-
# pull mirror from: https://github.com/Lucas-C/pre-commit-hooks
44-
- repo: https://gitlab.ba.rivosinc.com/pub/it/lucas-c-pre-commit-hooks
45-
rev: v1.1.11
47+
# pull mirror of https://github.com/fsfe/reuse-tool (slightly modified)
48+
- repo: https://github.com/rivosinc/reuse-tool
49+
rev: '3a95909a30d51467575a95b8cabdc7949bb8e7bd'
4650
hooks:
47-
- id: insert-license
48-
files: \.py$
49-
args:
50-
- --license-filepath
51-
- LICENSE_HDR.txt
52-
- id: insert-license
53-
files: \.(c|h|cc|cpp|S|svh|sv|svp)$
54-
args:
55-
- --license-filepath
56-
- LICENSE_HDR.txt
57-
- --comment-style
58-
- //
51+
# Check compliance
52+
- id: reuse
5953

6054
# pull mirror from: https://github.com/jumanjihouse/pre-commit-hooks.git
6155
- repo: https://gitlab.ba.rivosinc.com/pub/it/jumanjihouse_pre-commit-hooks

.pylintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2023 Rivos Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
15
[MESSAGES CONTROL]
26

37
disable=

.style.yapf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2023 Rivos Inc.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
15
[style]
26
# lowRISC style is basically pep8
37
based_on_style = pep8

LICENSE

Lines changed: 0 additions & 201 deletions
This file was deleted.

0 commit comments

Comments
 (0)