I have a loop doing decoding of data from a cookie that in part reads like this:
do {
/*jsl:ignore*/
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
/*jsl:end*/
// lots more code
} while (i < len);
I'm still getting warnings:
source.js(104): lint warning: increment (++) and decrement (--) operators used as part of greater statement
} while (i < len);
.........................^
I don't want to disable all checking for the loop, but I would like a way to quiet this warning. Is there a control comment that can turn off/on a single warning? Maybe a syntax like:
/*jsl:on:inc_dec_within_stmt*/
/*jsl:off:inc_dec_within_stmt*/
It would be nice if it could take a comma separated list of warnings. Maybe /*jsl:resetWarnings*/ to fall back to the warnings as set in the config file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a loop doing decoding of data from a cookie that in part reads like this:
do {
/*jsl:ignore*/
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
/*jsl:end*/
// lots more code
} while (i < len);
I'm still getting warnings:
source.js(104): lint warning: increment (++) and decrement (--) operators used as part of greater statement
} while (i < len);
.........................^
I don't want to disable all checking for the loop, but I would like a way to quiet this warning. Is there a control comment that can turn off/on a single warning? Maybe a syntax like:
/*jsl:on:inc_dec_within_stmt*/
/*jsl:off:inc_dec_within_stmt*/
It would be nice if it could take a comma separated list of warnings. Maybe /*jsl:resetWarnings*/ to fall back to the warnings as set in the config file.
The inability to properly suppress this warning is a bug, which I've fixed on the trunk. This fix will be included in the next release.
I've created a tracker item for your suggestion: https://sourceforge.net/tracker/index.php?func=detail&aid=1547250&group_id=168518&atid=847185.
Thanks a lot for your feedback. Hope this helps.