Skip to content

Commit 1969183

Browse files
Enable use of copyright checker directly without bazel (#477)
1 parent 077a0f5 commit 1969183

31 files changed

Lines changed: 375 additions & 68 deletions

.github/actions/link-check/action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
113
name: 'Link Check and Automated Issue'
214
description: 'Checks links, parses results, and creates or updates an issue with findings.'
315
inputs:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
#!/usr/bin/env bash
2+
# *******************************************************************************
3+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
4+
#
5+
# See the NOTICE file(s) distributed with this work for additional
6+
# information regarding copyright ownership.
7+
#
8+
# This program and the accompanying materials are made available under the
9+
# terms of the Apache License Version 2.0 which is available at
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# SPDX-License-Identifier: Apache-2.0
13+
# *******************************************************************************
214
set -e
315
bazel run //:docs_link_check > linkcheck_output.txt || true

.github/actions/link-check/link_parser.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
113
import argparse
214
import re
315
import sys

.github/workflows/copyright.yml

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

.github/workflows/link_check.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
113
name: Link Check
214

315
on:

.github/workflows/test_links.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
113
name: Link Check and Automated Issue
214

315
on:

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# *******************************************************************************
2+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
3+
#
4+
# See the NOTICE file(s) distributed with this work for additional
5+
# information regarding copyright ownership.
6+
#
7+
# This program and the accompanying materials are made available under the
8+
# terms of the Apache License Version 2.0 which is available at
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# SPDX-License-Identifier: Apache-2.0
12+
# *******************************************************************************
113
repos:
214
- repo: https://github.com/pre-commit/pre-commit-hooks
315
rev: v6.0.0
@@ -39,3 +51,9 @@ repos:
3951
entry: bash -c 'bazel run //:ide_support && .venv_docs/bin/python3 -m basedpyright'
4052
language: system
4153
pass_filenames: false
54+
55+
# Ensure every file has a copyright header as per the Eclipse Foundation's requirements
56+
- repo: https://github.com/eclipse-score/tooling
57+
rev: 31ff8eee214e4e97ef8f5cb46e443273515b63ec
58+
hooks:
59+
- id: copyright

BUILD

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,12 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313

14-
load("@score_tooling//:defs.bzl", "cli_helper", "copyright_checker")
14+
load("@score_tooling//:defs.bzl", "cli_helper")
1515
load("//:docs.bzl", "docs")
1616

1717
package(default_visibility = ["//visibility:public"])
1818
exports_files(["pyproject.toml"])
1919

20-
copyright_checker(
21-
name = "copyright",
22-
srcs = [
23-
"src",
24-
"//:BUILD",
25-
"//:MODULE.bazel",
26-
],
27-
config = "@score_tooling//cr_checker/resources:config",
28-
template = "@score_tooling//cr_checker/resources:templates",
29-
visibility = ["//visibility:public"],
30-
)
31-
3220
docs(
3321
data = [
3422
"@score_process//:needs_json",

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,3 @@ pre-commit install --hook-type pre-push
3232
```
3333

3434
Execute the pre-commit manually via `pre-commit run` or `pre-commit run --all-files` to run it on all files.
35-
36-
### Find & fix missing copyright
37-
38-
```bash
39-
bazel run //:copyright-check
40-
bazel run //:copyright.fix
41-
```

docs/concepts/bidirectional_traceability.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
..
2+
# *******************************************************************************
3+
# Copyright (c) 2026 Contributors to the Eclipse Foundation
4+
#
5+
# See the NOTICE file(s) distributed with this work for additional
6+
# information regarding copyright ownership.
7+
#
8+
# This program and the accompanying materials are made available under the
9+
# terms of the Apache License Version 2.0 which is available at
10+
# https://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# SPDX-License-Identifier: Apache-2.0
13+
# *******************************************************************************
114
.. _docs_bidirectional_traceability:
215

316
Bi-directional Traceability

0 commit comments

Comments
 (0)