Skip to content

Commit

Permalink
ci: enable super-linter
Browse files Browse the repository at this point in the history
- clang-format (.clang-format)
- commitlint   (.commitlintrc.yml)
- markdownlint (.markdown-lint.yml)
- yamllint     (.yaml-lint.yml)

Signed-off-by: Yi Huang <[email protected]>
  • Loading branch information
0yi0 committed Dec 4, 2024
1 parent 0726f99 commit 91b2113
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BasedOnStyle: LLVM
IndentWidth: 2
2 changes: 2 additions & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extends:
- @commitlint/config-conventional
41 changes: 41 additions & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: super-linter

on:
push:
branches: [ main ]
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: Run super-linter
uses: super-linter/[email protected]
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
CREATE_LOG_FILE: true
ENFORCE_COMMITLINT_CONFIGURATION_CHECK: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_GITLEAKS: true

- name: Upload log file
uses: actions/upload-artifact@v4
with:
path: super-linter.log
6 changes: 6 additions & 0 deletions .markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
MD007:
indent: 2 # Unordered list indentation
MD013:
line_length: 999 # Line length 80 is far to short. We allow soft wrapped paragraphs and raw code outputs
MD029: false # Ordered list item prefix
MD033: false # Allow inline HTML
6 changes: 6 additions & 0 deletions .yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extends: relaxed

rules:
indentation:
spaces: 2
indent-sequences: true

0 comments on commit 91b2113

Please sign in to comment.