-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
For bugs
- Rule Id (if any, e.g. SC1000): SC1073, SC1009, SC1072
- My shellcheck version (
shellcheck --versionor 'online'): online - I tried on shellcheck.net and verified that this is still a problem on the latest commit
- It's not reproducible on shellcheck.net, but I think that's because it's an OS, configuration or encoding issue
For new checks and feature suggestions
- shellcheck.net (i.e. the latest commit) currently gives no useful warnings about this
- I searched through https://github.com/koalaman/shellcheck/issues and didn't find anything related
Here's a snippet or screenshot that shows the problem:
#!/bin/ksh
(( X_NB_JOURS = round(X_NB_JOURS) ))Here's what shellcheck currently says:
Line 2 SC1073: Couldn't parse this ((..)) command. Fix to allow more checks.
Line 2 SC1009: The mentioned syntax error was in this ((..)) command.
Line 2 SC1072: Fix any mentioned problems and try again.
Here's what I wanted or expected to see:
TODO: Describe expected/desired output
Send a warning that the expression is not a "legitimate POXIS Arithmetic expression" or a "Linux flavor".
To me, "syntax error " is a very scary error.
Here are all arithmetics functions accepted on Linux KSH93.
abs acos acosh asin asinh atan atan2 atanh cbrt
copysign cos cosh erf erfc exp exp2 expm1 fabs
fdim finite floor fma fmax fmod hypot ilogb
int isinf isnan lgamma log log2 logb
nearbyint nextafter nexttoward pow remainder
rint round sin sinh sqrt tan tanh tgamma trunc
Check documentation:
https://docs.oracle.com/cd/E36784_01/html/E36870/ksh-1.html
Thank you so much for this excellent tool.
Metadata
Metadata
Assignees
Labels
No labels