Skip to content

Commit 1a60a83

Browse files
authored
Add reuse to pre commit hooks (#49)
* Add devcontainer to module template The devcontainer is a unified environment which should work in most cases without friction. This reduces setup time for developers. * Add dependabot for automated version updates Manually checking for updates is a pain in the ass and should be automated. * Add pre-commit configuration This prevents us to do easy to detect and fix mistakes * Add copyright pre-commit check * Add yamlfmt to pre-commit hooks * Add reuse to pre-commit checks
1 parent bca9736 commit 1a60a83

24 files changed

Lines changed: 482 additions & 11 deletions

.bazelrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
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+
# *******************************************************************************
13+
114
build --java_language_version=17
215
build --tool_java_language_version=17
316
build --java_runtime_version=remotejdk_17

.devcontainer/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +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+
# *******************************************************************************
13+
14+
# Use Dockerfile to get dependabot version bumps after new image is released
15+
FROM ghcr.io/eclipse-score/devcontainer:v1.2.0

.devcontainer/devcontainer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "eclipse-s-core",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
}
6+
}

.github/CODEOWNERS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
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+
# *******************************************************************************
13+
114
# Comment out as not in score yet
215
# * @eclipse-score/infrastructure-tooling-community
316
# .* @eclipse-score/infrastructure-tooling-community

.github/ISSUE_TEMPLATE/bug_fix.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
*******************************************************************************
14+
-->
15+
116
---
217
name: Bugfix
318
about: 'Issue to track a bugfix'
@@ -9,5 +24,3 @@ assignees: ''
924

1025
> [!IMPORTANT]
1126
> Make sure to link this issue with the PR for your bugfix.
12-
13-

.github/ISSUE_TEMPLATE/improvement.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
*******************************************************************************
14+
-->
15+
116
---
217
name: Improvement
318
about: 'Issue to track a improvement'

.github/PULL_REQUEST_TEMPLATE/bug_fix.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
*******************************************************************************
14+
-->
15+
116
# Bugfix
217

318
> [!IMPORTANT]

.github/PULL_REQUEST_TEMPLATE/improvement.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
*******************************************************************************
14+
-->
15+
116
# Improvement
217

318
> [!IMPORTANT]

.github/dependabot.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
# *******************************************************************************
13+
version: 2
14+
updates:
15+
- package-ecosystem: github-actions
16+
directory: /
17+
schedule:
18+
interval: daily
19+
groups:
20+
all-in-one:
21+
patterns:
22+
- "*"
23+
update-types:
24+
- "minor"
25+
- "patch"
26+
27+
- package-ecosystem: cargo
28+
directory: /
29+
schedule:
30+
interval: daily
31+
groups:
32+
all-in-one:
33+
patterns:
34+
- "*"
35+
update-types:
36+
- "minor"
37+
- "patch"
38+
39+
- package-ecosystem: pip
40+
directory: /
41+
schedule:
42+
interval: daily
43+
groups:
44+
all-in-one:
45+
patterns:
46+
- "*"
47+
update-types:
48+
- "minor"
49+
- "patch"
50+
51+
- package-ecosystem: docker
52+
directories:
53+
- /.devcontainer
54+
schedule:
55+
interval: daily
56+
groups:
57+
all-in-one:
58+
patterns:
59+
- "*"
60+
update-types:
61+
- "minor"
62+
- "patch"
63+
64+
- package-ecosystem: bazel
65+
directory: /
66+
schedule:
67+
interval: daily
68+
groups:
69+
all-in-one:
70+
patterns:
71+
- "*"
72+
update-types:
73+
- "minor"
74+
- "patch"

.github/workflows/pre-commit.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
# *******************************************************************************
13+
name: pre-commit
14+
on:
15+
pull_request:
16+
types: [opened, reopened, synchronize]
17+
jobs:
18+
self_test:
19+
name: 🔬 Self Test
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: 📥 Check out
23+
uses: actions/checkout@v6
24+
- name: ⚙️ Setup uv
25+
uses: astral-sh/setup-uv@v5
26+
- name: 🛠️ Run pre-commit
27+
run: uvx pre-commit run --all-files

0 commit comments

Comments
 (0)