Commit e39b924
authored
ci(shellcheck): drop SC2155 + clear SC2006 in demoLibrary.source (C3a) (openemr#156)
PR C3a of the ratchet cleanup. Closes out SC2006 (rc-wide) and
SC2155 (file-level) for docker/scripts/demoLibrary.source. SC2086
in this file is C3b's bulk SC2086 audit; the file-level disable is
trimmed but not removed.
SC2006 (4 sites, mechanical):
- L91, L162, L284: local MYSQLIP=`docker inspect ...`
- L285: local currentTime=`date "+..."`
All converted to $(...) form.
SC2155 (4 sites, surfaced after SC2006 fix):
Same code positions as the SC2006 fix above. Once the backticks
became $(...), shellcheck's "local x=$(cmd) masks return value"
finding became visible. Same masked-warning pattern as the SC2002
fold-in we hit in C2 (cat-in-grep mask).
Fix: split into two statements (declare separately, then assign).
Now if `docker inspect` or `date` fails, the assignment carries
the real exit code instead of being masked by `local`'s exit code.
Note on the rc estimate: .shellcheckrc said "(4 violations)" for
SC2155 but with SC2006 still active, shellcheck reported 0 SC2155
violations directly. The 4 became visible only after C3a's SC2006
fix, which is why this commit "closes out" both checks together
rather than handling SC2155 as a separate concern.
Side note: the rc estimate matched the actual count exactly (4) --
the comment was right, the count just wasn't reachable until
SC2006 was cleaned.
.shellcheckrc:
- SC2155 dropped (the only remaining rc disable -- file is now clean
except for the file-level SC2086 directive that C3b will retire).
docker/scripts/demoLibrary.source file-level directive:
- Trimmed from `disable=SC2086,SC2006,SC2155` to `disable=SC2086`.
C3b will remove the directive entirely once the 72 SC2086 sites
are individually fixed.
Verification:
- shellcheck repo-wide -- clean.
- build-tests dry-run suite -- 7/7 PASS.
- auto-derive fixture suite -- 8/8 PASS.
State after this PR: .shellcheckrc is empty of disables (only
external-sources=true remains). The file-level disable on
demoLibrary.source is the last remaining scoped ratchet.
Refs: openemr#146 (parent), openemr#149 + openemr#150 + openemr#151 + openemr#152 (prior ratchet PRs)
Assisted-by: Claude Code1 parent a842b55 commit e39b924
2 files changed
Lines changed: 15 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
| 91 | + | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| |||
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
161 | | - | |
| 163 | + | |
| 164 | + | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
280 | 283 | | |
281 | 284 | | |
282 | 285 | | |
283 | | - | |
284 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
285 | 290 | | |
286 | 291 | | |
287 | 292 | | |
| |||
0 commit comments