You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a snippet or screenshot that shows the problem:
#!/bin/bash -eu#!/usr/bin/env bash -x# This script violates best practices by specifying options directly in the shebang line.# The -e option causes the script to exit immediately if a command exits with a non-zero status.# The -u option causes the script to exit if an attempt is made to use an uninitialized variable.echo"This script has bash options in the shebang, which is not recommended."
Here's what shellcheck currently says:
$ shellcheck myscriptNo issues detected!
$
Here's what I wanted or expected to see:
$ shellcheck myscript[Line 1:]()#!/bin/bash -eu^-- [SC2xxx](https://www.shellcheck.net/wiki/SCxxxx) (warning): Executables must start with `#!/bin/bash` and a minimum number of flags. Use `set` to set shell options so that calling your script as` bash script_name` does not break its functionality.
$
For bugs
shellcheck --version
or "online"):For new checks and feature suggestions
Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
Suggested by Google Shell Style Guide (https://google.github.io/styleguide/shellguide.html#which-shell-to-use).
There is an error in the same neighbourhood (https://github.com/koalaman/shellcheck/wiki/SC2096)
The text was updated successfully, but these errors were encountered: