mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-15 01:23:07 -07:00
Add suggestion level in text for TTY output (fixes #2339)
This commit is contained in:
parent
6f7eee4a27
commit
38251abe26
2 changed files with 2 additions and 1 deletions
|
@ -29,6 +29,7 @@
|
||||||
- SC2181 now only triggers on single condition tests like `[ $? = 0 ]`.
|
- SC2181 now only triggers on single condition tests like `[ $? = 0 ]`.
|
||||||
- Quote warnings are now emitted for declaration utilities in sh
|
- Quote warnings are now emitted for declaration utilities in sh
|
||||||
- Leading `_` can now be used to suppress warnings about unused variables
|
- Leading `_` can now be used to suppress warnings about unused variables
|
||||||
|
- TTY output now includes warning level in text as well as color
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- SC1004: Literal backslash+linefeed in '' was found to be usually correct
|
- SC1004: Literal backslash+linefeed in '' was found to be usually correct
|
||||||
|
|
|
@ -174,7 +174,7 @@ showFixedString color comments lineNum fileLines =
|
||||||
cuteIndent :: PositionedComment -> String
|
cuteIndent :: PositionedComment -> String
|
||||||
cuteIndent comment =
|
cuteIndent comment =
|
||||||
replicate (fromIntegral $ colNo comment - 1) ' ' ++
|
replicate (fromIntegral $ colNo comment - 1) ' ' ++
|
||||||
makeArrow ++ " " ++ code (codeNo comment) ++ ": " ++ messageText comment
|
makeArrow ++ " " ++ code (codeNo comment) ++ " (" ++ severityText comment ++ "): " ++ messageText comment
|
||||||
where
|
where
|
||||||
arrow n = '^' : replicate (fromIntegral $ n-2) '-' ++ "^"
|
arrow n = '^' : replicate (fromIntegral $ n-2) '-' ++ "^"
|
||||||
makeArrow =
|
makeArrow =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue