mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 15:27:02 +08:00
Tweaked some messages and added more badcases
This commit is contained in:
1
badcase/ampersemi
Normal file
1
badcase/ampersemi
Normal file
@@ -0,0 +1 @@
|
||||
wget url &; echo "It's backgrounded."
|
1
badcase/apostrophecked
Normal file
1
badcase/apostrophecked
Normal file
@@ -0,0 +1 @@
|
||||
echo 'Shpell... It's the best!'
|
3
badcase/badKnR
Normal file
3
badcase/badKnR
Normal file
@@ -0,0 +1,3 @@
|
||||
for f in * do
|
||||
echo "$f"
|
||||
done
|
1
badcase/badescape
Normal file
1
badcase/badescape
Normal file
@@ -0,0 +1 @@
|
||||
echo hello\nword
|
7
badcase/badindenting
Normal file
7
badcase/badindenting
Normal file
@@ -0,0 +1,7 @@
|
||||
# Caution, white space sensitive file!
|
||||
if true
|
||||
then
|
||||
cat <<- FOO
|
||||
Some text
|
||||
FOO
|
||||
fi
|
3
badcase/heredoccasefault
Normal file
3
badcase/heredoccasefault
Normal file
@@ -0,0 +1,3 @@
|
||||
cat << EOF
|
||||
Hello world
|
||||
Eof
|
2
badcase/heredoclinefault
Normal file
2
badcase/heredoclinefault
Normal file
@@ -0,0 +1,2 @@
|
||||
cat << EOF
|
||||
Hello world EOF
|
@@ -1 +1 @@
|
||||
cat compile.sh |tr -d '\r' > compile.sh
|
||||
sed 's/foo/bar/g' myfile > myfile
|
||||
|
1
badcase/largepositionals
Normal file
1
badcase/largepositionals
Normal file
@@ -0,0 +1 @@
|
||||
ls ... "9" "$10" # DOS 4ever
|
1
badcase/lolbackticks
Normal file
1
badcase/lolbackticks
Normal file
@@ -0,0 +1 @@
|
||||
echo `ls`
|
1
badcase/lonelydollar
Normal file
1
badcase/lonelydollar
Normal file
@@ -0,0 +1 @@
|
||||
echo "$ is special now?"
|
4
badcase/mvmp3s
Normal file
4
badcase/mvmp3s
Normal file
@@ -0,0 +1,4 @@
|
||||
for f in *.mp3
|
||||
do
|
||||
mv $f /music
|
||||
done
|
5
badcase/mvmp3sfixed
Normal file
5
badcase/mvmp3sfixed
Normal file
@@ -0,0 +1,5 @@
|
||||
# There, I fixed it!
|
||||
for f in "$(ls *.mp3)"
|
||||
do
|
||||
mv "$f" /music
|
||||
done
|
1
badcase/stillapostrophecked
Normal file
1
badcase/stillapostrophecked
Normal file
@@ -0,0 +1 @@
|
||||
echo 'Shpell... It\'s the best!'
|
1
badcase/superfluousfunction
Normal file
1
badcase/superfluousfunction
Normal file
@@ -0,0 +1 @@
|
||||
function foo() { echo bar; }
|
1
badcase/unquotedexpansion
Normal file
1
badcase/unquotedexpansion
Normal file
@@ -0,0 +1 @@
|
||||
echo Your locales: $(locale)
|
1
badcase/uuoc
Normal file
1
badcase/uuoc
Normal file
@@ -0,0 +1 @@
|
||||
cat foo | grep bar
|
6
badcase/worseindenting
Normal file
6
badcase/worseindenting
Normal file
@@ -0,0 +1,6 @@
|
||||
if true
|
||||
then
|
||||
cat << FOO
|
||||
Some text
|
||||
FOO
|
||||
fi
|
Reference in New Issue
Block a user