This is an automated email from the ASF dual-hosted git repository.

wave pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/petri-site.git


The following commit(s) were added to refs/heads/master by this push:
     new fece5a9  Add GitHub Actions to lint Markdown, spelling, trailing 
whitespace, YAML
     new 8325430  Merge pull request #9 from jbampton/add-linters
fece5a9 is described below

commit fece5a9a05a04615a6b998cf685e07e75961ee72
Author: John Bampton <[email protected]>
AuthorDate: Mon Mar 15 06:35:02 2021 +1000

    Add GitHub Actions to lint Markdown, spelling, trailing whitespace, YAML
---
 .github/workflows/lint.yml | 60 ++++++++++++++++++++++++++++++++++++++++++++++
 .markdownlint.yaml         |  8 +++++++
 .yamllint.yaml             |  9 +++++++
 content/info.yaml          |  1 -
 4 files changed, 77 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 0000000..2931e17
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,60 @@
+name: Lint
+
+on: [pull_request]
+
+jobs:
+  markdownlint:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os:
+          - ubuntu-latest
+        node_version:
+          - 14
+        architecture:
+          - x64
+    name: Markdown Node ${{ matrix.node_version }} - ${{ matrix.architecture 
}} on ${{ matrix.os }}
+    steps:
+      - uses: actions/checkout@v2
+      - name: Setup node
+        uses: actions/setup-node@v2
+        with:
+          node-version: ${{ matrix.node_version }}
+          architecture: ${{ matrix.architecture }}
+      - run: npm install -g [email protected]
+      - run: markdownlint '**/*.md'
+  misspell:
+    name: Check Spelling
+    runs-on: ubuntu-latest
+    steps:
+      - name: Check Out
+        uses: actions/checkout@v2
+      - name: Install
+        run: |
+          wget -O - -q https://git.io/misspell | sh -s -- -b .
+      - name: Misspell
+        run: |
+          git ls-files --empty-directory | xargs ./misspell -error
+  trailing-whitespace:
+    name: Trailing whitespace
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: Check for trailing whitespace
+        run: "! git grep -EIn $'[ \t]+$'"
+  yamllint:
+    name: YAML
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions/setup-python@v2
+        with:
+          python-version: '3.x'  # Version range or exact version of a Python 
version to use, using SemVer's version range syntax
+          architecture: 'x64'  # optional x64 or x86. Defaults to x64 if not 
specified
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+          pip install yamllint
+      - name: YAML Lint
+        run: |
+          yamllint --strict .
diff --git a/.markdownlint.yaml b/.markdownlint.yaml
new file mode 100644
index 0000000..3e45238
--- /dev/null
+++ b/.markdownlint.yaml
@@ -0,0 +1,8 @@
+MD004: false
+MD012: false
+MD013: false
+MD022: false
+MD032: false
+MD033: false
+MD034: false
+MD041: false
diff --git a/.yamllint.yaml b/.yamllint.yaml
new file mode 100644
index 0000000..126f3af
--- /dev/null
+++ b/.yamllint.yaml
@@ -0,0 +1,9 @@
+---
+
+extends: default
+
+rules:
+  colons: disable
+  document-start: disable
+  line-length: disable
+  truthy: disable
diff --git a/content/info.yaml b/content/info.yaml
index 211d04c..0f292ff 100644
--- a/content/info.yaml
+++ b/content/info.yaml
@@ -51,4 +51,3 @@ followers:
  - [email protected]
  - [email protected]
  - [email protected]
-

Reply via email to