Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing SC2166 URL in summary section #2983

Open
1 of 3 tasks
motminh opened this issue May 10, 2024 · 1 comment
Open
1 of 3 tasks

Missing SC2166 URL in summary section #2983

motminh opened this issue May 10, 2024 · 1 comment

Comments

@motminh
Copy link

motminh commented May 10, 2024

For bugs

For new checks and feature suggestions

Here's a snippet or screenshot that shows the problem:

In foo.rc line 86:
    if [ -n "${FOO_OBJ_PATH}" -a ! -d "${FOO_OBJ_PATH}" ]; then
                               ^-- SC2166 (warning): Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.

Here's what shellcheck currently says:

shellcheck threw a SC2166, but the summary didn't list the wiki URL for reference and explanation:

For more information:
https://www.shellcheck.net/wiki/SC2148 -- Tips depend on target shell and y...
https://www.shellcheck.net/wiki/SC1090 -- ShellCheck can't follow non-const...
https://www.shellcheck.net/wiki/SC2010 -- Don't use ls | grep. Use a glob o...

Here's what I wanted or expected to see:

https://www.shellcheck.net/wiki/SC2166 -- Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.

@brother
Copy link
Collaborator

brother commented May 11, 2024

0.10.0 does show it. Maybe we need a more complete example? You have errors reported that does not show in the current example. Is it possible to have a minimal case?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants