ITADN

shellcheck doesn't warn that scripts can fail due to `set -e`

#3444Openfilipopo 创建于 2026-04-10
F
filipopocommented
#### Here's a snippet or screenshot that shows the problem: ```sh #!/bin/bash set -e rosker() { local name="${1:-filip}" shift echo "$name" } ``` #### Here's what shellcheck currently says: ``` No issues detected! ``` #### Here's what I wanted or expected to see: A warning that if no arguments are passed to this function that `shift` will crash and a recommendation to change it to something like `shift || true`
1 条评论