diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml new file mode 100644 index 0000000..3c3e246 --- /dev/null +++ b/.github/linters/.markdown-lint.yml @@ -0,0 +1,4 @@ +# https://github.com/DavidAnson/markdownlint#rules--aliases +# markdownlint -c .github/linters/.markdown-lint.yml . + +MD040: false diff --git a/.yamllint b/.github/linters/.yaml-lint.yml similarity index 100% rename from .yamllint rename to .github/linters/.yaml-lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 69963cc..8da5f3b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,49 +1,28 @@ -name: โ„๏ธ Lint +name: Lint on: [pull_request] jobs: - markdownlint: - name: ๐Ÿถ Markdown + merge-conflict: + name: Merge Conflict runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: ๐Ÿš€ Use Node.js - uses: actions/setup-node@v2.1.4 - with: - node-version: '12.x' - - run: npm install -g markdownlint-cli@0.25.0 - - run: markdownlint '**/*.md' --ignore node_modules - shellcheck: - name: ๐Ÿฅ‚ Shell + - name: Check merge conflict + run: grep "^<<<<<<< HEAD" $(git ls-files | xargs) && exit 1 || true + misspell: + name: Check Spelling runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: ๐Ÿงน ShellCheck - uses: ludeeus/action-shellcheck@master + - 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 + name: Trailing Whitespace runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: ๐Ÿงน Check for trailing whitespace - run: | - cd utils || exit - sh ./check-for-trailing-whitespace.sh || exit 1 - 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: | - # return non-zero exit code on warnings - yamllint --strict . + - name: Check for trailing whitespace + run: "! git grep -EIn $'[ \t]+$'" diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml new file mode 100644 index 0000000..b33fbf5 --- /dev/null +++ b/.github/workflows/super-linter.yml @@ -0,0 +1,24 @@ +name: Super Linter + +on: + push: + branches-ignore: [master] + # Remove the line above to run when pushing to master + pull_request: + branches: [master] + +jobs: + build: + name: Lint Code Base + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: github/super-linter@v3 + env: + ERROR_ON_MISSING_EXEC_BIT: true + VALIDATE_BASH: true + VALIDATE_BASH_EXEC: true + VALIDATE_MARKDOWN: true + VALIDATE_SHELL_SHFMT: true + VALIDATE_YAML: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.markdownlint.yml b/.markdownlint.yml deleted file mode 100644 index c31debf..0000000 --- a/.markdownlint.yml +++ /dev/null @@ -1,3 +0,0 @@ -MD014: false -MD040: false -MD041: false diff --git a/README.md b/README.md index 611a5c9..c7980f0 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,13 @@ stdin | stdout You can try it out by (firstly `cd` to streem top directory): ```shell -$ bin/streem -e 'stdin | stdout' +bin/streem -e 'stdin | stdout' ``` or ```shell -$ bin/streem examples/01cat.strm +bin/streem examples/01cat.strm ``` Streem is a (sort of) DSL for data flows. Above code means diff --git a/doc/index.md b/doc/index.md index e4e4ca8..8f52995 100644 --- a/doc/index.md +++ b/doc/index.md @@ -1,3 +1,3 @@ -## Library +# Library [math](https://github.com/matz/streem/doc/library/math.md) diff --git a/super-linter.report/.keep b/super-linter.report/.keep new file mode 100644 index 0000000..e69de29 diff --git a/utils/check-for-trailing-whitespace.sh b/utils/check-for-trailing-whitespace.sh deleted file mode 100755 index 00be038..0000000 --- a/utils/check-for-trailing-whitespace.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -cd .. || exit -# print first -grep -EHInr '( +)$' ./* - -var=$(grep -EHInr '( +)$' ./*) -# then exit with fail if found -if test -z "$var"; then - exit 0 -else - exit 1 -fi