Actions
Feature #14277
closedImprove shell lint checks
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
Description
https://github.com/ksh93/ksh recently pulled in some of the shell linter improvements from illumos issues #13601 and #13631 but they improved the code and removed the explicit string comparisons.
We should re-sync with their version - https://github.com/ksh93/ksh/pull/353
Related issues
Updated by Andy Fiddaman 6 months ago
- Related to Bug #13601: ksh shell lint misleading added
Updated by Andy Fiddaman 6 months ago
- Related to Bug #13631: shell lint about variable expansion in arithmetic expressions is inscrutable added
Updated by Andy Fiddaman 6 months ago
With the new changes, the lint output becomes:
/data/omnios-build/ksh/linttest: warning: line 5: [[... -eq ...]] obsolete, use ((... == ...)) /data/omnios-build/ksh/linttest: warning: line 6: [[... -ne ...]] obsolete, use ((... != ...)) /data/omnios-build/ksh/linttest: warning: line 7: [[... -lt ...]] obsolete, use ((... < ...)) /data/omnios-build/ksh/linttest: warning: line 8: [[... -gt ...]] obsolete, use ((... > ...)) /data/omnios-build/ksh/linttest: warning: line 9: [[... -le ...]] obsolete, use ((... <= ...)) /data/omnios-build/ksh/linttest: warning: line 10: [[... -ge ...]] obsolete, use ((... >= ...)) /data/omnios-build/ksh/linttest: warning: line 14: in '(( $a > 1 ))', using '$' is slower and can introduce rounding errors
Updated by Electric Monk 6 months ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit be548e87bcb4979e0b8a7bce5620a9916b888fdc
commit be548e87bcb4979e0b8a7bce5620a9916b888fdc Author: Andy Fiddaman <omnios@citrus-it.co.uk> Date: 2021-12-06T16:51:35.000Z 14277 Improve shell lint checks Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org> Approved by: Dan McDonald <danmcd@joyent.com>
Actions