Skip to content

Commit 7b6c6c8

Browse files
authored
update cr checker and apply to repo (#169)
* adapt config files * [cr_checker]: enhance functionality - allow for different border fill characters - detect multiple headers - add a new line after adding a new header * add missing copyright
1 parent daab491 commit 7b6c6c8

41 files changed

Lines changed: 691 additions & 269 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pre-commit-config.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ repos:
1616
hooks:
1717
- id: check-yaml
1818
- id: end-of-file-fixer
19-
exclude: requirements_lock.txt
19+
exclude: requirements_lock.txt|\.svg$
2020
- id: trailing-whitespace
2121
- id: check-shebang-scripts-are-executable
2222
- id: check-executables-have-shebangs
2323
- id: check-added-large-files
2424
args: [--maxkb=100, --enforce-all] # increase or add git lfs if too strict
25-
exclude: org.eclipse.dash.licenses-1.1.0.jar|blanket_index.html
25+
exclude: org.eclipse.dash.licenses-1.1.0.jar|blanket_index.html$
2626
- repo: https://github.com/google/yamlfmt
2727
rev: 21ca5323a9c87ee37a434e0ca908efc0a89daa07 # v0.21.0
2828
hooks:
@@ -31,11 +31,13 @@ repos:
3131
rev: a1bb792acda6fd0724936b4ebbdbc8eceb9c0459 # v6.2.0
3232
hooks:
3333
- id: reuse-lint-file
34+
exclude: \.svg$
3435
- repo: local
3536
hooks:
3637
- id: copyright
3738
name: Check and fix copyright headers with cr_checker
3839
entry: cr_checker/tool/pre-commit_wrapper --extensions h hpp c cpp rs rst py sh bzl ini yml yaml BUILD bazel --fix
40+
exclude: \.svg$
3941
# this would be the better language implementation, but struggle with python tooling
4042
# language: python
4143
language: script

BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ copyright_checker(
2828
"python_basics",
2929
"starpls",
3030
"tools",
31-
"plantuml",
3231
"lobster_bazel",
32+
"bazel",
33+
"manual_analysis",
34+
"plantuml",
35+
"validation",
3336

3437
# Add other directories/files you want to check
3538
],

bazel/rules/rules_score/README.md

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
# Rules Score
215

316
Starlark rules implementing the **S-CORE** functional-safety development process

bazel/rules/rules_score/examples/seooc/safety_analysis/assets/fta_example.puml

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
@startuml
215

316
!include ../../../../../../../plantuml/fta_metamodel.puml

bazel/rules/rules_score/examples/seooc/safety_analysis/assets/safety_analysis.puml

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
' *******************************************************************************
215
' Copyright (c) {year} Contributors to the Eclipse Foundation
316
'

bazel/rules/rules_score/examples/seooc/safety_analysis/safety_analysis.md

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
# Safety Analysis
215

316
This document shows the workflow and the interrelation on how to document an FMEA in TRLC / PlantUml / Lobster.

bazel/rules/rules_score/examples/seooc/unit_1/docs/unit_1_class_diagram.puml

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
@startuml unit_1_class_diagram
215

316
namespace unit_1 {

bazel/rules/rules_score/examples/seooc/unit_2/docs/unit_2_class_diagram.puml

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
@startuml unit_2_class_diagram
215

316
namespace unit_1 {

bazel/rules/rules_score/private/sphinx_module.bzl

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
load("//bazel/rules/rules_score:providers.bzl", "SphinxModuleInfo", "SphinxNeedsInfo")
215

316
# ======================================================================================

bazel/rules/rules_score/rules_score.bzl

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
load(
215
"//bazel/rules/rules_score:providers.bzl",
316
_ComponentInfo = "ComponentInfo",

0 commit comments

Comments
 (0)