mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 13:13:18 +08:00
Add a Diff output format
This commit is contained in:
@@ -152,6 +152,23 @@ not warn at all, as `ksh` supports decimals in arithmetic contexts.
|
||||
...
|
||||
</checkstyle>
|
||||
|
||||
**diff**
|
||||
|
||||
: Auto-fixes in unified diff format. Can be piped to `git apply` or `patch -p1`
|
||||
to automatically apply fixes.
|
||||
|
||||
--- a/test.sh
|
||||
+++ b/test.sh
|
||||
@@ -2,6 +2,6 @@
|
||||
## Example of a broken script.
|
||||
for f in $(ls *.m3u)
|
||||
do
|
||||
- grep -qi hq.*mp3 $f \
|
||||
+ grep -qi hq.*mp3 "$f" \
|
||||
&& echo -e 'Playlist $f contains a HQ file in mp3 format'
|
||||
done
|
||||
|
||||
|
||||
**json1**
|
||||
|
||||
: Json is a popular serialization format that is more suitable for web
|
||||
|
Reference in New Issue
Block a user