mirror of
https://github.com/ludeeus/action-shellcheck.git
synced 2025-09-15 04:36:26 +02:00
Split ignore into ignore_paths and ignore_names (#52)
This commit is contained in:
2
.github/workflows/additional_files.yml
vendored
2
.github/workflows/additional_files.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
id: check
|
||||
with:
|
||||
additional_files: run finish discovery
|
||||
ignore: ignore
|
||||
ignore_paths: ignore
|
||||
scandir: testfiles
|
||||
|
||||
- name: Verify check
|
||||
|
2
.github/workflows/check_together.yml
vendored
2
.github/workflows/check_together.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
uses: ./
|
||||
id: check
|
||||
with:
|
||||
ignore: ignore
|
||||
ignore_paths: ignore
|
||||
check_together: true
|
||||
|
||||
- name: Verify check
|
||||
|
41
.github/workflows/ignore_names.yml
vendored
Normal file
41
.github/workflows/ignore_names.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: 'ignore_names'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["master"]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
ignore_names:
|
||||
name: ignore_names
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Run ShellCheck
|
||||
uses: ./
|
||||
id: check
|
||||
with:
|
||||
ignore_paths: ignore
|
||||
ignore_names: ignore_single_file.sh
|
||||
|
||||
- name: Verify check
|
||||
run: |
|
||||
expect="testfiles/test.bash"
|
||||
notexpect="testfiles/ignore_single_file.sh"
|
||||
|
||||
if [[ ! "${{ steps.check.outputs.files }}" =~ $expect ]];then
|
||||
echo "::error:: Expected file $expect not found in ${{ steps.check.outputs.files }}"
|
||||
exit 1
|
||||
elif [[ "${{ steps.check.outputs.files }}" =~ $notexpect ]];then
|
||||
echo "::error:: Expected file $notexpect found in ${{ steps.check.outputs.files }}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
name: 'base'
|
||||
name: 'ignore_paths'
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -6,8 +6,8 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
base:
|
||||
name: base
|
||||
ignore_paths:
|
||||
name: ignore_paths
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
uses: ./
|
||||
id: check
|
||||
with:
|
||||
ignore: ignore
|
||||
ignore_paths: ignore
|
||||
|
||||
- name: Verify check
|
||||
run: |
|
||||
@@ -35,4 +35,4 @@ jobs:
|
||||
elif [[ "${{ steps.check.outputs.files }}" =~ $notexpect ]];then
|
||||
echo "::error:: Expected file $notexpect found in ${{ steps.check.outputs.files }}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
2
.github/workflows/scandir.yml
vendored
2
.github/workflows/scandir.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
id: two
|
||||
with:
|
||||
scandir: './testfiles/scandir'
|
||||
ignore: ignore
|
||||
ignore_paths: ignore
|
||||
|
||||
- name: Verify check
|
||||
run: |
|
||||
|
Reference in New Issue
Block a user