-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Drop #shellcheck comments #3473
Comments
Please elaborate. @zapashcanon and myself both feel #3455 is in good shape. Please specifically point out the major problem that the PR creates. |
Done in #3470. |
While the PR works and it is a fine addition, it introduces the need for
|
This happens fairly often in programming languages (
This script has no dependency on any checking tools. This argument is invalid.
If not, Travis will (eventually) warn them once we get it into our CI. This is intended. Please provide a better argument. The time spent discussing this topic adds little value. It should be put in more useful places. |
Which does not make it less of a disadvantage. You are citing workarounds,
Answer to what?
What happens if you remove the comment?
May you post the shellcheck error?
This error could be avoided if shellcheck were smarter, so I am proposing an enhancement. |
Complain to shellcheck. This is staying as-is. |
Someone may.
Why? You could disable these checks from the command-line invocation. @zapashcanon, may you post the shellcheck error? |
@jasp00: not sure if this is what you're asking but: SC2086: Double quote to prevent globbing and word splitting. SC1090: Can't follow non-constant source. Use a directive to specify location. From their wiki. They have a very good wiki I have to say. If you just google You can also see it the the travis log. |
Thank you, @zapashcanon. As I thought, messages give no clue about how to disable these errors, which come from shellcheck's limitations rather than the code. Because of mentioned disadvantages, these checks should be disabled from the command line to decouple scripts from the specific tool. |
So you'd rather disable this warning and miss a lot more of cases where quoting is necessary ? |
Stop this madness. |
@tresf, could you explain why cannot this enhancement be achieved? Dropping these comments would help.
I am concerned that a newcomer may try to fix a false positive, without a hint that it may be so, and go unnoticed; she may not look for SC2086 and may double quote as instructed. Thus, I have suggested to disable the warning. This was my first impression, now I am not so sure. Should we disable these warnings? I only say that shellcheck should be smarter as I indicated, then these comments would not be needed. I did not consider SC1090, which looks more tricky, but I guess it can be solved; then these comments would not be needed either. You do not have to drop comments right now, since workarounds are temporarily necessary, but it should be a goal that someone may try to accomplish later. |
You're bikeshedding. If someone finds a clean way to remove the comments without adding unnecessary complications to these very simple shell scripts, we'd happily merge. |
Yet you have closed the issue, so no one will look for a clean way. |
Follows #3455.
Scripts should not have
# shellcheck disable
comments and multiple commands in.travis.yml
should be moved to separate scripts that could be checked.The text was updated successfully, but these errors were encountered: