Showing 4,018 of 4,054 total issues
Avoid qualifying class selectors with an element. Open
dl.planting-attributes {
- Create a ticketCreate a ticket
- Exclude checks
Selector should have depth of applicability no greater than 2, but was 3 Open
a:hover {
- Create a ticketCreate a ticket
- Exclude checks
Selector should have depth of applicability no greater than 2, but was 3 Open
a {
- Create a ticketCreate a ticket
- Exclude checks
Selector should have depth of applicability no greater than 2, but was 3 Open
.badge-harvest {
- Create a ticketCreate a ticket
- Exclude checks
Selector should have depth of applicability no greater than 2, but was 3 Open
dt {
- Create a ticketCreate a ticket
- Exclude checks
Rule declaration should be followed by an empty line Open
}
- Create a ticketCreate a ticket
- Exclude checks
Begin pseudo elements with double colons: ::
Open
.site-name:after {
- Create a ticketCreate a ticket
- Exclude checks
Avoid qualifying class selectors with an element. Open
img.img-cute {
- Create a ticketCreate a ticket
- Exclude checks
Avoid qualifying class selectors with an element. Open
img.img-tiny {
- Create a ticketCreate a ticket
- Exclude checks
Selector should have depth of applicability no greater than 2, but was 3 Open
.stats a {
- Create a ticketCreate a ticket
- Exclude checks
Selector should have depth of applicability no greater than 2, but was 3 Open
h3 {
- Create a ticketCreate a ticket
- Exclude checks
Selector should have depth of applicability no greater than 2, but was 3 Open
.badge {
- Create a ticketCreate a ticket
- Exclude checks
Selector should have depth of applicability no greater than 2, but was 3 Open
span {
- Create a ticketCreate a ticket
- Exclude checks
Selector should have depth of applicability no greater than 2, but was 3 Open
span {
- Create a ticketCreate a ticket
- Exclude checks
This { is literal. Check expression (missing ;/\n?) or quote it. Open
response=$(curl --write-out %{http_code} --silent --output /dev/null $host)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This {
/}
is literal. Check expression (missing ;/\n?
) or quote it.
Problematic code:
rmf() { rm -f "$@" }
or
eval echo \${foo}
Correct code:
rmf() { rm -f "$@"; }
and
eval "echo \${foo}"
Rationale:
Curly brackets are normally used as syntax in parameter expansion, command grouping and brace expansion.
However, if they don't appear alone at the start of an expression or as part of a parameter or brace expansion, the shell silently treats them as literals. This frequently indicates a bug, so ShellCheck warns about it.
In the example function, the }
is literal because it's not at the start of an expression. We fix it by adding a ;
before it.
In the example eval, the code works fine. However, we can quiet the warning and follow good practice by adding quotes around the literal data.
ShellCheck does not warn about {}
, since this is frequently used with find
and rarely indicates a bug.
Exceptions
This error is harmless when the curly brackets are supposed to be literal, in e.g. awk {'print $1'}
. However, it's cleaner and less error prone to simply include them inside the quotes: awk '{print $1}'
.
Notice
Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.
Not following: .env: openFile: does not exist (No such file or directory) Open
source .env
- Read upRead up
- Create a ticketCreate a ticket
- 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.
This } is literal. Check expression (missing ;/\n?) or quote it. Open
response=$(curl --write-out %{http_code} --silent --output /dev/null $host)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This {
/}
is literal. Check expression (missing ;/\n?
) or quote it.
Problematic code:
rmf() { rm -f "$@" }
or
eval echo \${foo}
Correct code:
rmf() { rm -f "$@"; }
and
eval "echo \${foo}"
Rationale:
Curly brackets are normally used as syntax in parameter expansion, command grouping and brace expansion.
However, if they don't appear alone at the start of an expression or as part of a parameter or brace expansion, the shell silently treats them as literals. This frequently indicates a bug, so ShellCheck warns about it.
In the example function, the }
is literal because it's not at the start of an expression. We fix it by adding a ;
before it.
In the example eval, the code works fine. However, we can quiet the warning and follow good practice by adding quotes around the literal data.
ShellCheck does not warn about {}
, since this is frequently used with find
and rarely indicates a bug.
Exceptions
This error is harmless when the curly brackets are supposed to be literal, in e.g. awk {'print $1'}
. However, it's cleaner and less error prone to simply include them inside the quotes: awk '{print $1}'
.
Notice
Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.