Skip to content

Commit 2257a07

Browse files
Merge pull request #4 from assertwell/release/v1.0.1
Version 1.0.1
2 parents 8b3df7f + e66cc9b commit 2257a07

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ jobs:
2020
- name: Validate composer.json
2121
run: composer validate
2222

23-
- name: Check coding standards
23+
- name: Run static analysis
2424
run: composer test

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Version 1.0.1] — 2022-02-08
8+
9+
### Fixed
10+
11+
* Prevent recursion when calling the bundled ShellCheck script via Composer script ([#3]).
12+
13+
## [Version 1.0.0] — 2022-02-08
14+
15+
Initial release.
16+
17+
[Unreleased]: https://github.com/assertwell/shellcheck/compare/main...develop
18+
[Version 1.0.0]: https://github.com/assertwell/shellcheck/releases/tag/v1.0.0
19+
[Version 1.0.1]: https://github.com/assertwell/shellcheck/releases/tag/v1.0.1
20+
[#3]: https://github.com/assertwell/shellcheck/pull/3

bin/shellcheck

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ while [ $# -gt 0 ]; do
4141
esac
4242
done
4343

44+
# When run as part of a Composer script, the bin-dir will be pushed to the front of the $PATH.
45+
#
46+
# However, this can lead to recursion since the first "shellcheck" script `command -v shellcheck`
47+
# will find will be...well, this one.
48+
if [[ -n "$COMPOSER_BIN_DIR" ]]; then
49+
# shellcheck disable=SC2001
50+
PATH="$(sed -e "s|^${COMPOSER_BIN_DIR}:||" <<< "$PATH")"
51+
fi
52+
4453
# Find the local ShellCheck binary.
4554
shellcheck="$(command -v shellcheck)"
4655

0 commit comments

Comments
 (0)