Vidar Holen
20d11c1c33
Merge branch 'e-kwsm-tautologically-false'
2025-05-17 00:56:52 +00:00
Vidar Holen
47d358c1d4
Tighten SC2333/SC2334 to only trigger against literals.
2025-05-17 00:55:50 +00:00
Vidar Holen
ad58768563
Merge branch 'tautologically-false' of github.com:e-kwsm/shellcheck into e-kwsm-tautologically-false
2025-05-12 17:04:34 +00:00
Vidar Holen
62a8ecf9bf
Merge branch 'e-kwsm-SC3013'
2025-04-27 16:16:49 -07:00
Vidar Holen
0b5410d759
Merge pull request #3193 from iehrenwald/master
...
Add python3 to the list of badShells
2025-04-27 16:09:19 -07:00
iehrenwald
975cfeee50
Merge pull request #1 from iehrenwald/add_python3_badshell
...
Add python3 to the list of badShells
2025-04-25 14:20:01 -04:00
Ian Ehrenwald
b381658dbc
Add python3 to the list of badShells
2025-04-25 14:11:07 -04:00
Vidar Holen
950578ae0e
Merge branch 'Flu-ignore-sc2015-true'
2025-04-11 19:15:34 -07:00
Vidar Holen
f78714e0f6
Add ":" alongside "true" for SC2015
2025-04-11 19:14:53 -07:00
Vidar Holen
de07ec1c56
Merge branch 'ignore-sc2015-true' of github.com:Flu/shellcheck into Flu-ignore-sc2015-true
2025-04-11 19:14:15 -07:00
Vidar Holen
85066dd805
Merge remote-tracking branch 'refs/remotes/origin/master'
2025-04-11 14:17:29 -07:00
Vidar Holen
140274b810
Merge branch 'e-kwsm-SC3013-unary'
2025-04-11 14:14:36 -07:00
Vidar Holen
dc41f0cc5b
Refactor checks for POSIX test flags
2025-04-11 14:14:09 -07:00
Vidar Holen
fbb8386797
Merge pull request #3170 from e-kwsm/SC3012
...
fix(SC3012)!: do not warn about `\<` and `\>` in test/[] as specified in POSIX.1-2024
2025-04-09 10:51:44 -07:00
Eisuke Kawashima
efb5a5a274
fix(SC3013): check POSIX-compliant unary operators for test and [
...
fix #2125
2025-04-09 19:21:53 +09:00
Vidar Holen
553a80f77a
Also ignore SC2119 for :? and :+.
2025-04-08 21:21:50 -07:00
Vidar Holen
7fc992d0dc
Suppress SC2119/SC2120 for ${1:-default} ( fixes #2023 )
2025-04-08 20:52:52 -07:00
Vidar Holen
c553288085
Merge pull request #3106 from larryv/updatevars-bash-5.3
...
Recognize internal variables new in bash 5.3
2025-04-08 20:09:29 -07:00
Vidar Holen
1be41dd652
Merge pull request #3082 from silby/oksh
...
Recognize "oksh" executable name as ksh
2025-04-08 20:08:53 -07:00
Vidar Holen
2eddec86d3
Merge pull request #3185 from e-kwsm/man
...
doc: update man
2025-04-08 20:08:05 -07:00
Vidar Holen
c41f3a4b8a
Warn about [ ! -o opt ] (and -a) being unconditionally true ( fixes #3174 )
2025-04-08 10:53:52 -07:00
Vidar Holen
574c6d18fb
Suggest using test -e instead of -a ( fixes #3174 ).
2025-04-08 10:23:10 -07:00
Eisuke Kawashima
e4853af5b0
doc: update man
2025-04-08 19:31:58 +09:00
Vidar Holen
72af76f443
Supress SC2093 when execfail is set ( fixes #3178 )
2025-04-06 19:58:13 -07:00
Vidar Holen
8ff0c5be7a
Suppress SC2216 when piping to cp/mv/rm -i ( fixes #3141 ).
2025-04-06 19:27:29 -07:00
Eisuke Kawashima
4f628cbe2a
feat: check tautologically-false conditionals
...
- fix #3179 — negation of SC2055, `[ x = y -a x = z]`
- fix #3181 — negation of SC2056, `(( x == y && x == z ))`
- fix #3180 — negation of SC2252, `[ x = y ] && [ x = z ]`
2025-04-04 18:21:35 +09:00
Eisuke Kawashima
bc60607f9e
fix(SC3012)!: do not warn about \<
and \>
in test/[] as specified in POSIX.1-2024
...
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/test.html
fix #3168
2025-03-24 06:32:32 +09:00
Eisuke Kawashima
3a9ddae06b
fix(SC3013)!: remove SC3013 since the operators are specified by POSIX.1-2024
...
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/test.html
fix #3167
2025-03-24 06:24:12 +09:00
Adrian Fluturel
cbf0b33463
Skip SC2015 when the last command is true
2025-01-07 03:24:29 +01:00
Lawrence Velázquez
fe315a25c4
Recognize internal variables new in bash 5.3
...
From the bug-bash@gnu.org announcement "Bash-5.3-beta available":
q. GLOBSORT: new variable to specify how to sort the results of
pathname expansion (name, size, blocks, mtime, atime, ctime,
none) in ascending or descending order.
w. BASH_MONOSECONDS: new dynamic variable that returns the value of
the system's monotonic clock, if one is available.
x. BASH_TRAPSIG: new variable, set to the numeric signal number of
the trap being executed while it's running.
https://lists.gnu.org/archive/html/bug-bash/2024-12/msg00120.html
2024-12-28 03:20:19 -05:00
Joseph C. Sible
d3001f337a
Simplify getParseOutput
2024-12-13 23:57:50 -05:00
Joseph C. Sible
7deb7e853b
Use mapM_ instead of sequence_ and <$>
2024-12-13 23:47:55 -05:00
Joseph C. Sible
26b949b9b0
Use mapM_ instead of isJust and fromJust
2024-12-13 23:45:32 -05:00
Joseph C. Sible
5adfea21ee
Use the result of the comparison directly instead of an if/else
2024-12-13 23:20:48 -05:00
Joseph C. Sible
0ecaf2b5f1
Use foldr instead of explicit recursion
2024-12-13 23:19:36 -05:00
Joseph C. Sible
195b70db8c
Use unless instead of when and not
2024-12-13 23:06:49 -05:00
Vidar Holen
3c75d82db5
Fix stacktest complaining about permissions on /mnt
2024-11-29 13:00:36 -08:00
Vidar Holen
7f3f014d49
Allow latest QuickCheck
2024-11-28 11:51:22 -08:00
Evan Silberman
944d87915a
Recognize "oksh" executable name as ksh
...
A portable version of OpenBSD's ksh is distributed with the executable
name oksh [1]. It's a descendant of pdksh and can be shellchecked as
ksh.
[1]: https://github.com/ibara/oksh
2024-11-11 11:24:21 -08:00
Vidar Holen
47bff1d5fd
Add 24.04 to distrotest LTS
2024-11-03 16:54:45 -08:00
Vidar Holen
0ee46a0f33
Update filepath dependency
2024-11-03 14:19:08 -08:00
Vidar Holen
792466bc22
Update Diff dependency ( fixes #3075 )
2024-11-03 13:56:51 -08:00
Vidar Holen
097018754b
Mention that SC2002 (UUOC) is now no longer enabled by default.
2024-10-27 18:10:00 -07:00
Vidar Holen
f2932ebcdc
Remember to add changelog to release messages ( fixes #3051 )
2024-10-27 16:02:56 -07:00
Vidar Holen
5e3e98bcb0
Use CFG to determine use-before-define for SC2218 ( fixes #3070 )
2024-10-27 15:43:30 -07:00
Vidar Holen
68bc17b8ea
Merge pull request #3056 from random1223/patch-1
...
Update README.md and add Codety into the tool list
2024-10-27 12:47:16 -07:00
Tony
5c2be767ab
Update README.md
...
Add Codety Scanner into the static analysis solution list.
Here are the examples of the result:
* Codety's pull request code review example: https://github.com/codetyio/codety-scanner/pull/66#issuecomment-2339438925
* Codety's GitHub code scan result example : https://github.com/codetyio/codety-scanner/runs/29907371258
Codety Scanner is open source: https://github.com/codetyio/codety-scanner
2024-09-09 18:56:18 -07:00
Vidar Holen
79e43c4550
Allow parsing arbitrary coproc names ( fixes #3048 )
2024-09-07 17:14:52 -07:00
Vidar Holen
ca65071d77
Run unit tests in GitHub actions
2024-09-01 14:08:15 -07:00
Vidar Holen
8a1b24c7af
Fix paths for CI binary packaging after upgrade
2024-09-01 13:56:44 -07:00