guild-operators icon indicating copy to clipboard operation
guild-operators copied to clipboard

Address issues/exceptions raised by setting shellcheck severity to warning

Open rdlrt opened this issue 1 year ago • 0 comments

Currently, we have it set to error but that could be leniant (+ slightly inconsistent across the board) for various scripts

./scripts/grest-helper-scripts/getmetrics.sh:50:14: warning: Prefer mapfile or read -a to split command output (or quote to avoid splitting). [SC2207]
./scripts/grest-helper-scripts/getmetrics.sh:51:13: warning: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. [SC2124]
./scripts/grest-helper-scripts/getmetrics.sh:55:14: warning: Prefer mapfile or read -a to split command output (or quote to avoid splitting). [SC2207]
./scripts/grest-helper-scripts/getmetrics.sh:56:13: warning: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. [SC2124]
./scripts/cnode-helper-scripts/gLiveView.sh:130:19: warning: Quote the right-hand side of != in [[ ]] to prevent glob matching. [SC2053]
./scripts/cnode-helper-scripts/gLiveView.sh:586:147: warning: Quote the right-hand side of = in [[ ]] to prevent glob matching. [SC2053]
./scripts/cnode-helper-scripts/gLiveView.sh:586:182: warning: Quote the right-hand side of = in [[ ]] to prevent glob matching. [SC2053]
./scripts/cnode-helper-scripts/gLiveView.sh:607:147: warning: Quote the right-hand side of = in [[ ]] to prevent glob matching. [SC2053]
./scripts/cnode-helper-scripts/gLiveView.sh:607:182: warning: Quote the right-hand side of = in [[ ]] to prevent glob matching. [SC2053]
./scripts/cnode-helper-scripts/gLiveView.sh:612:13: warning: Declare and assign separately to avoid masking return values. [SC2155]
./scripts/cnode-helper-scripts/gLiveView.sh:626:28: warning: Prefer mapfile or read -a to split command output (or quote to avoid splitting). [SC2207]
./scripts/cnode-helper-scripts/gLiveView.sh:826:20: warning: Quote the right-hand side of != in [[ ]] to prevent glob matching. [SC2053]
./scripts/cnode-helper-scripts/cntools.sh:579:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:579:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:580:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:580:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:581:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:581:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:582:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:582:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:596:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:596:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:597:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:597:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:598:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:598:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:599:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:599:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:600:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:600:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:601:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:601:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:602:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:602:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:772:56: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:774:55: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:776:65: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:1057:46: warning: Quote the right-hand side of = in [[ ]] to prevent glob matching. [SC2053]
./scripts/cnode-helper-scripts/cntools.sh:1521:31: warning: Quote arguments to unset so they're not glob expanded. [SC2184]
./scripts/cnode-helper-scripts/cntools.sh:1526:29: warning: Quote arguments to unset so they're not glob expanded. [SC2184]
./scripts/cnode-helper-scripts/cntools.sh:2021:88: warning: Quote this to prevent word splitting. [SC2046]
./scripts/cnode-helper-scripts/cntools.sh:2581:68: warning: Quote this to prevent word splitting. [SC2046]
./scripts/cnode-helper-scripts/cntools.sh:2598:66: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:2599:75: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:2935:95: warning: Quote this to prevent word splitting. [SC2046]
./scripts/cnode-helper-scripts/cntools.sh:2937:93: warning: Quote this to prevent word splitting. [SC2046]
./scripts/cnode-helper-scripts/cntools.sh:3532:75: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:3580:47: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:3637:38: warning: Quote the right-hand side of != in [[ ]] to prevent glob matching. [SC2053]
./scripts/cnode-helper-scripts/cntools.sh:3646:41: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4310:41: warning: Quote this to prevent word splitting. [SC2046]
./scripts/cnode-helper-scripts/cntools.sh:4310:69: warning: Quote this to prevent word splitting. [SC2046]
./scripts/cnode-helper-scripts/cntools.sh:4379:26: warning: Variable was used as an array but is now assigned a string. [SC2[178](https://github.com/cardano-community/guild-operators/actions/runs/10766018134/job/29851106359#step:3:185)]
./scripts/cnode-helper-scripts/cntools.sh:4380:26: warning: Variable was used as an array but is now assigned a string. [SC2178]
./scripts/cnode-helper-scripts/cntools.sh:4381:26: warning: Variable was used as an array but is now assigned a string. [SC2178]
./scripts/cnode-helper-scripts/cntools.sh:4386:23: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4387:23: warning: Expanding an array without an index only gives the first element. [SC2128]
./scripts/cnode-helper-scripts/cntools.sh:4387:23: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4501:25: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4503:47: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4509:25: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4516:45: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4577:23: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4579:37: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4735:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4735:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4736:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4736:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4737:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4737:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:4995:25: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5012:25: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5016:33: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5044:29: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5057:29: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5099:31: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5119:31: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5131:29: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5455:30: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5456:30: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5457:30: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5458:30: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5459:30: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5460:30: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5461:30: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:5462:30: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:6695:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:6695:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:6696:46: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/cntools.sh:6696:61: warning: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. [SC2206]
./scripts/cnode-helper-scripts/logMonitor.sh:142:36: warning: This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten. [SC2319]
./scripts/cnode-helper-scripts/dbsync.sh:63:3: warning: DBSYNC_VERSION appears unused. Verify use (or export if used externally). [SC2034]
./scripts/cnode-helper-scripts/blockPerf.sh:160:106: warning: errors appears unused. Verify use (or export if used externally). [SC2034]
./scripts/cnode-helper-scripts/blockPerf.sh:[193](https://github.com/cardano-community/guild-operators/actions/runs/10766018134/job/29851106359#step:3:200):21: warning: Use single quotes, otherwise this expands now rather than when signalled. [SC2064]
./scripts/cnode-helper-scripts/blockPerf.sh:200:8: warning: Quote this to prevent word splitting. [SC2046]
./scripts/cnode-helper-scripts/blockPerf.sh:204:8: warning: Quote this to prevent word splitting. [SC2046]
./scripts/cnode-helper-scripts/blockPerf.sh:258:58: warning: Quote this to prevent word splitting. [SC2046]
./scripts/cnode-helper-scripts/blockPerf.sh:282:12: warning: AddrBlacklist is referenced but not assigned. [SC2154]
./scripts/cnode-helper-scripts/blockPerf.sh:305:41: warning: result appears unused. Verify use (or export if used externally). [SC2034]
./scripts/cnode-helper-scripts/blockPerf.sh:316:37: warning: blockTimeSfr1 appears unused. Verify use (or export if used externally). [SC2034]
./scripts/cnode-helper-scripts/blockPerf.sh:317:32: warning: blockTimeDeltaSlots appears unused. Verify use (or export if used externally). [SC2034]
./scripts/cnode-helper-scripts/blockPerf.sh:317:55: warning: deltaCbf appears unused. Verify use (or export if used externally). [SC2034]
./scripts/cnode-helper-scripts/blockPerf.sh:317:68: warning: deltaSfr appears unused. Verify use (or export if used externally). [SC2034]
./scripts/cnode-helper-scripts/blockPerf.sh:317:81: warning: deltaAb appears unused. Verify use (or export if used externally). [SC[203](https://github.com/cardano-community/guild-operators/actions/runs/10766018134/job/29851106359#step:3:210)4]
./scripts/cnode-helper-scripts/blockPerf.sh:346:17: warning: Quote this to prevent word splitting. [SC2046]
./scripts/cnode-helper-scripts/blockPerf.sh:388:16: warning: Quote this to prevent word splitting. [SC[204](https://github.com/cardano-community/guild-operators/actions/runs/10766018134/job/29851106359#step:3:211)6]
./scripts/cnode-helper-scripts/blockPerf.sh:411:12: warning: Quote this to prevent word splitting. [SC2046]
./scripts/cnode-helper-scripts/blockPerf.sh:426:5: warning: forkMode appears unused. Verify use (or export if used externally). [SC2034]
./scripts/cnode-helper-scripts/mithril-relay.sh:10:1: warning: RELAY_LISTENING_PORT appears unused. Verify use (or export if used externally). [SC2034]
./scripts/cnode-helper-scripts/mithril-relay.sh:20:1: warning: ADDITIONAL_ALLOWED_IP appears unused. Verify use (or export if used externally). [SC2034]
./scripts/cnode-helper-scripts/mithril-relay.sh:21:1: warning: BLOCK_PRODUCER_IP appears unused. Verify use (or export if used externally). [SC2034]
./scripts/cnode-helper-scripts/mithril-relay.sh:22:1: warning: RELAY_LISTENING_IP appears unused. Verify use (or export if used externally). [SC2034]

rdlrt avatar Sep 09 '24 03:09 rdlrt