From 2b3f48577d259370fb8b1466fb277688f21e05ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Bia=C5=82ow=C4=85s?= Date: Thu, 15 Jun 2023 17:09:28 +0200 Subject: [PATCH] ci: add markdownlint, misspell and languagetool JIRA: CI-94 --- .github/workflows/lint.yml | 41 ++++++++++++++++++++++++++++++++++++++ .markdownlint.yaml | 36 +++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .markdownlint.yaml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..732a3e69 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,41 @@ +# vim:sw=2:ts=2 +# static linters which can be run in a single repo (do not need phoenix-rtos-project) +name: lint + +# on events +on: + pull_request: + branches: + - master + - 'feature/*' + +jobs: + markdownlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: reviewdog/action-markdownlint@v0 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + fail_on_error: true + + misspell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: reviewdog/action-misspell@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + fail_on_error: true + + + languagetool: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: reviewdog/action-languagetool@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 00000000..4481e243 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,36 @@ +# Example markdownlint configuration with all properties set to their default value + +# Default state for all rules +default: true + +# Path to configuration file to extend +extends: null + +# MD010/no-hard-tabs - Hard tabs +MD010: + # Include code blocks + code_blocks: false + # Fenced code languages to ignore + ignore_code_languages: [] + # Number of spaces for each hard tab + spaces_per_tab: 4 + +# MD013/line-length - Line length +MD013: + # Number of characters + line_length: 120 + # Number of characters for headings + heading_line_length: 120 + # Number of characters for code blocks + code_block_line_length: 120 + # Include code blocks + code_blocks: false + # Strict length checking + strict: false + # Stern length checking + stern: true + +# MD033/no-inline-html - Inline HTML +MD033: + # Allowed elements + allowed_elements: [img]