Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CI): add the GitHub Super Linter #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://github.com/DavidAnson/markdownlint#rules--aliases
# markdownlint -c .github/linters/.markdown-lint.yml .

MD040: false
File renamed without changes.
49 changes: 14 additions & 35 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
node-version: '12.x'
- run: npm install -g [email protected]
- 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]+$'"
24 changes: 24 additions & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
@@ -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 }}
3 changes: 0 additions & 3 deletions .markdownlint.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Library
# Library

[math](https://github.com/matz/streem/doc/library/math.md)
Empty file added super-linter.report/.keep
Empty file.
13 changes: 0 additions & 13 deletions utils/check-for-trailing-whitespace.sh

This file was deleted.