diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..f4edc74b --- /dev/null +++ b/.clang-format @@ -0,0 +1,2 @@ +BasedOnStyle: LLVM +IndentWidth: 2 diff --git a/.github/linters/.commitlintrc.yml b/.github/linters/.commitlintrc.yml new file mode 100644 index 00000000..7ed6a30d --- /dev/null +++ b/.github/linters/.commitlintrc.yml @@ -0,0 +1,3 @@ +--- +extends: + - '@commitlint/config-conventional' diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml new file mode 100644 index 00000000..682fd9e2 --- /dev/null +++ b/.github/linters/.markdown-lint.yml @@ -0,0 +1,7 @@ +--- +MD007: # Unordered list indentation + indent: 2 # Consider disable MD005 if things fail on ordered list +MD013: # Line length 80 is far to short + line_length: 999 # We allow soft wrapped paragraphs and raw code outputs +MD029: false # Ordered list item prefix +MD033: false # Allow inline HTML diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml new file mode 100644 index 00000000..b3cac20c --- /dev/null +++ b/.github/linters/.yaml-lint.yml @@ -0,0 +1,7 @@ +--- +extends: relaxed + +rules: + indentation: + spaces: 2 + indent-sequences: true diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml new file mode 100644 index 00000000..a0c9884d --- /dev/null +++ b/.github/workflows/super-linter.yml @@ -0,0 +1,45 @@ +--- +name: super-linter + +on: + pull_request: + branches: [main] + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + permissions: + contents: read + + steps: + - name: Checkout with history + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Work around super-linter + shell: bash + run: | + # Work-around for config file detection + cp .github/linters/.commitlintrc.yml .commitlintrc.yml + + - name: Run super-linter + uses: super-linter/super-linter/slim@v7.2.0 + env: + VALIDATE_ALL_CODEBASE: false # only check new or edited files + # language configurations + VALIDATE_CLANG_FORMAT: true + VALIDATE_GIT_COMMITLINT: true + VALIDATE_MARKDOWN: true + VALIDATE_YAML: true + # misc configurations + ENFORCE_COMMITLINT_CONFIGURATION_CHECK: true + MULTI_STATUS: false # disable status report + SUPPRESS_POSSUM: true + VALIDATE_GITHUB_ACTIONS: true + VALIDATE_GITLEAKS: true + # Work-around for SHA detection + # https://github.com/super-linter/super-linter/issues/6316#issuecomment-2510205626 + GITHUB_BEFORE_SHA: ${{ github.event.pull_request.base.sha }}