Skip to content

Commit

Permalink
Merge pull request #2 from DSD-DBS/fix/licenses
Browse files Browse the repository at this point in the history
Fix licenses
  • Loading branch information
Leon0402 authored Aug 9, 2023
2 parents 6f96b76 + 2c2030a commit c962992
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 135 deletions.
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
# SPDX-FileCopyrightText: Copyright DB Netz AG
# SPDX-License-Identifier: CC0-1.0

Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
Expand Down
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
# SPDX-FileCopyrightText: Copyright DB Netz AG
# SPDX-License-Identifier: CC0-1.0

# google-readability-avoid-underscore-in-googletest-name: The rationale behind this is explained in the GTest FAQ. Basically, it avoids illegal or duplicated names created by GTest based on the inputs to TEST_F.
# -readability-function-size, -readability-function-cognitive-complexity: Disabled because our functions are too complex at the moment and refactoring needs to be done separately.
# -modernize-concat-nested-namespaces: We don't actually use C++17 yet, so we need to disable C++17 fixes.
Expand Down
3 changes: 3 additions & 0 deletions .cmake-format.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright DB Netz AG
# SPDX-License-Identifier: Apache-2.0

# ----------------------------------
# Options affecting listfile parsing
# ----------------------------------
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# SPDX-FileCopyrightText: Copyright DB Netz AG
# SPDX-License-Identifier: CC0-1.0

---
name: Rail Horizon CI

on:
Expand Down
116 changes: 70 additions & 46 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,83 @@
---
# SPDX-FileCopyrightText: Copyright DB Netz AG
# SPDX-License-Identifier: CC0-1.0

---
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.1
hooks:
- id: insert-license
name: Insert license headers (Markdown)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --comment-style
- <!--| ~| -->
types_or: [markdown]
files: ''
- id: insert-license
name: Insert license headers (XML)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --insert-license-after-regex
- ^<\?xml.*\?>
- --comment-style
- <!--| ~| -->
types_or: [xml]
files: ''
- id: insert-license
name: Insert license headers (C, C++)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header.txt
- --comment-style
- /*| *| */
types_or: [c, c++]
files: ''
- id: insert-license
name: Insert license headers (Python)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header.txt
- --comment-style
- '#'
types_or: [python]
files: ''
- id: insert-license
name: Insert license headers (CMake, Shell)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --comment-style
- '#'
types_or: [gitmodules, gitignore, cmake, shell]
files: ''
- id: insert-license
name: Insert license headers (YAML)
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --insert-license-after-regex
- ^---$
- --comment-style
- '#'
types_or: [yaml]
files: ''
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.4.0
hooks:
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.2
rev: 0.2.3
hooks:
- id: yamlfmt
- repo: https://github.com/pre-commit/mirrors-yapf
Expand All @@ -35,49 +102,6 @@ repos:
# verbose: true
- id: cmake-lint
exclude: CPM.cmake
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.4.2
hooks:
- id: insert-license
name: Insert license headers (shell-style comments)
files: (?:^|/)(?:.*\.(?:sh|toml|ya?ml|cmake)|\.((?:git|helm|docker)(ignore|modules)|.clang-format|Doxyfile.in)|CMakeLists.txt)$
# exclude: '(?:^|/)\..+|^docs/Makefile$'
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --comment-style
- '#'
- id: insert-license
name: Insert license headers (XML-style comments)
files: \.(?:html|md|xml)$
exclude: (?:^|/)\..+
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --comment-style
- <!--| ~| -->
- id: insert-license
name: Insert license headers (C-style comments)
files: \.(?:cpp|h|proto)$
exclude: (?:^|/)\..+
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header.txt
- --comment-style
- /*| *| */
- id: insert-license
name: Insert license headers (C-style comments)
files: \.(?:py)$
exclude: (?:^|/)\..+
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header.txt
- --comment-style
- '#'
- repo: local
hooks:
- id: include-what-you-use
Expand Down
87 changes: 0 additions & 87 deletions azure-pipelines.yml

This file was deleted.

5 changes: 5 additions & 0 deletions src/dsd_map_service_ros_wrapper/package.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?xml version="1.0"?>
<!--
~ SPDX-FileCopyrightText: Copyright DB Netz AG
~ SPDX-License-Identifier: CC0-1.0
-->

<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>dsd_map_service_ros_wrapper</name>
Expand Down
2 changes: 1 addition & 1 deletion src/dsd_rail_horizon/config/parameters.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# SPDX-FileCopyrightText: Copyright DB Netz AG
# SPDX-License-Identifier: CC0-1.0

---
rail_horizon_publisher:
ros__parameters:
rail_horizon_namespace: /rail_horizon/
Expand Down
5 changes: 5 additions & 0 deletions src/dsd_rail_horizon/package.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?xml version="1.0"?>
<!--
~ SPDX-FileCopyrightText: Copyright DB Netz AG
~ SPDX-License-Identifier: CC0-1.0
-->

<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>dsd_rail_horizon</name>
Expand Down
5 changes: 5 additions & 0 deletions src/dsd_rail_horizon_core/package.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<?xml version="1.0"?>
<!--
~ SPDX-FileCopyrightText: Copyright DB Netz AG
~ SPDX-License-Identifier: CC0-1.0
-->

<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>dsd_rail_horizon_core</name>
Expand Down

0 comments on commit c962992

Please sign in to comment.