Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
submodules: false
- name: Format and Clippy - Stable toolchain
uses: eclipse-opensovd/cicd-workflows/rust-lint-and-format-action@b90aee53ba1739e08f7991d24241b23903a8c11a
uses: eclipse-opensovd/cicd-workflows/rust-lint-and-format-action@feat/pre-commit-hook-args-config
with:
toolchain: 1.88.0
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -48,7 +48,7 @@ jobs:
rustfmt-enable-reviewdog: "false"
error-on-unformatted: "false"
- name: Format and Clippy - Nightly toolchain pinned
uses: eclipse-opensovd/cicd-workflows/rust-lint-and-format-action@b90aee53ba1739e08f7991d24241b23903a8c11a
uses: eclipse-opensovd/cicd-workflows/rust-lint-and-format-action@feat/pre-commit-hook-args-config
with:
toolchain: nightly-2025-07-14
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Format and Clippy - Nightly toolchain latest
id: nightly-clippy
continue-on-error: true
uses: eclipse-opensovd/cicd-workflows/rust-lint-and-format-action@b90aee53ba1739e08f7991d24241b23903a8c11a
uses: eclipse-opensovd/cicd-workflows/rust-lint-and-format-action@feat/pre-commit-hook-args-config
with:
toolchain: nightly
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ on:
permissions:
contents: read

env:
PYTHON_VERSION: 3.13
PRE_COMMIT_VERSION: 4.2

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
Expand All @@ -33,4 +29,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Run checks
uses: eclipse-opensovd/cicd-workflows/pre-commit-action@b90aee53ba1739e08f7991d24241b23903a8c11a
uses: eclipse-opensovd/cicd-workflows/pre-commit-action@feat/pre-commit-hook-args-config
with:
rust-toolchain: "1.88"
16 changes: 16 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2025 The Contributors to Eclipse OpenSOVD (see CONTRIBUTORS)
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
default: true
MD013:
line_length: 1000
MD024:
siblings_only: true
MD033: false
MD060: false
62 changes: 62 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2026 The Contributors to Eclipse OpenSOVD (see CONTRIBUTORS)
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-merge-conflict
- id: end-of-file-fixer
exclude: '\.lock$'
- id: trailing-whitespace
exclude: '\.(patch|diff|lock)$'
- id: mixed-line-ending
exclude: '\.lock$'
- repo: https://github.com/google/yamlfmt
rev: v0.21.0
hooks:
- id: yamlfmt
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.48.0
hooks:
- id: markdownlint-docker
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
hooks:
- id: ruff-check
- id: ruff-format
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1
hooks:
- id: gitleaks
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.11.0
hooks:
- id: shellcheck
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://github.com/eclipse-opensovd/cicd-workflows
rev: b2b41099a192fdc1c7f88e85e1823600f1c9faa0
hooks:
- id: reuse-annotate
- id: no-unicode-check
args:
- --allowed-chars=µ,§
- id: no-banner-comment-check
- id: validate-cargo-lints
- id: cargo-fmt
- id: clippy
- id: check-hooks
13 changes: 4 additions & 9 deletions rustfmt.toml → .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0

style_edition = "2024"
max_width = 100

# in case rustfmt stopps working again, enable these options
# to get more information about the error
# requires to run rustfmt with nightly toolchain
# for example: `rustfmt +nightly src/diagtype/mod.rs --edition 2024 --verbose`
# error_on_unformatted = true
# error_on_line_overflow = true
#format_strings = true
newline_style = "Unix"
group_imports = "StdExternalCrate"
imports_granularity = "Crate"
12 changes: 12 additions & 0 deletions .yamlfmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2025 The Contributors to Eclipse OpenSOVD (see CONTRIBUTORS)
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
formatter:
type: basic
retain_line_breaks_single: true
Loading