Skip to content

Commit

Permalink
ci: lint shell scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Di Donato <[email protected]>
  • Loading branch information
leodido committed Mar 9, 2023
1 parent f55d646 commit c762dc8
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*.go text eol=lf
*.go text eol=lf
*.sh text eol=lf
*.bash text eol=lf
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
path-to-signatures: '.github/cla/signatures.json'
path-to-document: 'https://github.com/listendev/lstn/blob/main/.github/cla/ICLA.md'
branch: 'signatures' # must not be protected
allowlist: dependabot*
allowlist: github-actions,dependabot*
create-file-commit-message: 'docs: store CLA signature'
signed-commit-message: 'chore: $contributorName has signed the CLA in #$pullRequestNo'
# use-dco-flag: true # Set this to true if you want to use a dco instead of a CLA
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ permissions:

jobs:
lint:
name: "go"
runs-on: ubuntu-latest

steps:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: linting

on:
push:
paths:
- "**.bash"
- "**.sh"
branches: ['main']
pull_request:
paths:
- "**.bash"
- "**.sh"
branches: ['main']

jobs:
shellcheck:
name: "shell"
runs-on: ubuntu-latest

strategy:
matrix:
shell:
- sh
- dash
- bash
- ksh

steps:
- uses: actions/checkout@v3

- name: Run shellcheck
uses: reviewdog/[email protected]
env:
reporter: github-pr-review
pattern: |
*.sh
*.bash
fail_on_error: true

0 comments on commit c762dc8

Please sign in to comment.