Skip to content

Commit 0995e79

Browse files
committed
Use split option and filter out bad fixtures
1 parent 64fb244 commit 0995e79

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/lint_random_files.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ jobs:
169169
grep -E '${{ github.event.inputs.pattern }}' |
170170
shuf -n ${{ github.event.inputs.num || 100 }} | tr '\n' ','"
171171
echo "command: ${command}"
172-
files=$(eval ${command})
172+
files=$(eval ${command} | grep -v '/fixtures/bad/')
173+
173174
echo "files=$files" >> $GITHUB_OUTPUT
174175
175176
# Lint file names
@@ -203,9 +204,9 @@ jobs:
203204
# Define the path to a utility for linting package.json files:
204205
lint_package_json="${root}/lib/node_modules/@stdlib/_tools/lint/pkg-json/bin/cli"
205206
206-
files=$(echo "${{ steps.random-files.outputs.files }}" | tr ',' '\n' | grep 'package\.json$' | grep -v 'datapackage\.json$')
207+
files=$(echo "${{ steps.random-files.outputs.files }}" | tr ',' '\n' | grep 'package\.json$' | grep -v 'datapackage\.json$' | tr '\n' ' ' | sed 's/ $//')
207208
if [ -n "${files}" ]; then
208-
echo "${files}" | "${lint_package_json}"
209+
echo "${files}" | "${lint_package_json}" --split=" "
209210
fi
210211
211212
# Lint REPL help files...
@@ -218,9 +219,9 @@ jobs:
218219
# Define the path to a utility for linting REPL help files:
219220
lint_repl_help="${root}/lib/node_modules/@stdlib/_tools/lint/repl-txt/bin/cli"
220221
221-
files=$(echo "${{ steps.random-files.outputs.files }}" | tr ',' '\n' | grep 'repl\.txt$' | tr '\n' ' ')
222+
files=$(echo "${{ steps.random-files.outputs.files }}" | tr ',' '\n' | grep 'repl\.txt$' | tr '\n' ' ' | sed 's/ $//')
222223
if [ -n "${files}" ]; then
223-
echo "${files}" | "${lint_repl_help}"
224+
echo "${files}" | "${lint_repl_help}" --split=" "
224225
fi
225226
226227
# Lint shell script files:

0 commit comments

Comments
 (0)