Showing 211 of 211 total issues
Rule doesn't have all its properties in alphabetical order. Open
.card-body {
- Exclude checks
Use of !important Open
border-collapse: collapse !important;
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.games-accordion {
- Exclude checks
Fallback background-color (hex or RGB) should precede RGBA background-color. Open
background-color: rgba(200, 200, 200, 0.5);
- Exclude checks
Inconsistent indentation for list items at the same level Open
1. `sources.py`: download logfiles in parallel using `wget --continue`
- Read upRead up
- Exclude checks
MD005 - Inconsistent indentation for list items at the same level
Tags: bullet, ul, indentation
Aliases: list-indent
This rule is triggered when list items are parsed as being at the same level, but don't have the same indentation:
* Item 1
* Nested Item 1
* Nested Item 2
* A misaligned item
Usually this rule will be triggered because of a typo. Correct the indentation for the list to fix it:
* Item 1
* Nested Item 1
* Nested Item 2
* Nested Item 3
Inconsistent indentation for list items at the same level Open
1. `log_import.py`: load each game (eg each line) from logfiles into the database
- Read upRead up
- Exclude checks
MD005 - Inconsistent indentation for list items at the same level
Tags: bullet, ul, indentation
Aliases: list-indent
This rule is triggered when list items are parsed as being at the same level, but don't have the same indentation:
* Item 1
* Nested Item 1
* Nested Item 2
* A misaligned item
Usually this rule will be triggered because of a typo. Correct the indentation for the list to fix it:
* Item 1
* Nested Item 1
* Nested Item 2
* Nested Item 3
Adjoining classes: .nav-tabs .nav-link.active:focus Open
.nav-tabs .nav-link.active, .nav-tabs .nav-link.active:focus, .nav-tabs .nav-link.active:hover {
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
div.awesomplete > ul {
- Exclude checks
Adjoining classes: .navbar-nav .nav-link.active:hover Open
.navbar-nav .nav-link.active:hover,
- Exclude checks
Not following: /root/venv/bin/activate: openFile: permission denied (Permission denied) Open
. /root/venv/bin/activate
- Read upRead up
- Exclude checks
Not following: (error message here)
Reasons include: file not found, no permissions, not included on the command line, not allowing shellcheck
to follow files with -x
, etc.
Problematic code:
source somefile
Correct code:
# shellcheck disable=SC1091
source somefile
Rationale:
ShellCheck, for whichever reason, is not able to access the source file.
This could be because you did not include it on the command line, did not use shellcheck -x
to allow following other files, don't have permissions or a variety of other problems.
Feel free to ignore the error with a [[directive]].
Exceptions:
If you're fine with it, ignore the message with a [[directive]].
Notice
Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.
Rule doesn't have all its properties in alphabetical order. Open
div.awesomplete > ul {
- Exclude checks
Fallback border (hex or RGB) should precede RGBA border. Open
border: 1px solid rgba(0,0,0,.3);
- Exclude checks
Fallback background (hex or RGB) should precede HSL background. Open
background: hsl(68, 100%, 41%);
- Exclude checks
Adjoining classes: .navbar-nav .nav-link.active:hover Open
.navbar-nav .nav-link.active:hover,
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.nav-tabs .nav-link.active, .nav-tabs .nav-link.active:focus, .nav-tabs .nav-link.active:hover {
- Exclude checks
Fallback background-color (hex or RGB) should precede RGBA background-color. Open
background-color: rgba(255,255,255,0.5);
- Exclude checks
Use 'cd ... || exit' or 'cd ... || return' in case cd fails. Open
cd /app/scoreboard
- Read upRead up
- Exclude checks
Use cd ... || exit in case cd fails.
Problematic code:
cd generated_files
rm -r *.c
func(){
cd foo
do_something
}
Correct code:
cd generated_files || exit
rm -r *.c
# For functions, you may want to use return:
func(){
cd foo || return
do_something
}
Rationale:
cd
can fail for a variety of reasons: misspelled paths, missing directories, missing permissions, broken symlinks and more.
If/when it does, the script will keep going and do all its operations in the wrong directory. This can be messy, especially if the operations involve creating or deleting a lot of files.
To avoid this, make sure you handle the cases when cd
fails. Ways to do this include
-
cd foo || exit
as suggested to just abort immediately -
if cd foo; then echo "Ok"; else echo "Fail"; fi
for custom handling -
<(cd foo && cmd)
as an alternative to<(cd foo || exit; cmd)
in<(..)
,$(..)
or( )
Exceptions:
ShellCheck does not give this warning when cd
is on the left of a ||
or &&
, or the condition of a if
, while
or until
loop. Having a set -e
command anywhere in the script will disable this message, even though it won't necessarily prevent the issue.
If you are accounting for cd
failures in a way shellcheck doesn't realize, you can disable this message with a [[directive]].
Notice
Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.
Adjoining classes: .navbar-nav .nav-link.active:focus Open
.navbar-nav .nav-link.active:focus,
- Exclude checks
Fallback background-color (hex or RGB) should precede RGBA background-color. Open
background-color: rgba(168, 205, 168, 0.5);
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.card-title {
- Exclude checks