Skip to content

Shellchecked xdg-mime

Slatian requested to merge slatian/xdg-utils:shellcheck-xdg-mime into master
  • Replace legacy backticks with "$(
  • Fix for `echo $a | sed 's/:/ /g'`; … antipattern usinf IFS=:
  • Quote a lot of filepaths to avoid time of check time od use inconsistencies
  • Quote all other use of variables
    • for none of them not-quoting seemend intentional
    • even where it just "doen't hurt"
    • except for for loops 😉
  • disable checks for mispelled variables where the spelling is intentional
  • move the local bashisms to their own lines so that when a posix shell trips over them the script shouldn't fail because of them.

Did not fix:

  • local is posix "incompatible" (SC3043) (but worked around it)
  • SC2086 (info): Double quote to prevent globbing and word splitting. For $xdg_redirect_output pattern.
Edited by Slatian

Merge request reports