You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
If --fix-dry-run fixes all the lint errors in the code, the linter exits with 0. This is wrong behaviour because dry run doesn't permanently fix those errors in the code, so linter should still consider them when exiting with a code.
Steps to reproduce
For the sake of simplicity, sample.sol should contain 1 fixable lint issue (eg- quotes-related issue). .soliumrc.json should mark this issue's rule as an error.
Run solium -f sample.sol --fix-dry-run
Then check the exit code in bash echo $?
Output: 0
Expected behavior
Exit code should be > 0 because the error still exists in the code.
Operating System
Platform-independent
Linter version 1.2.2
Comments
This issue was discovered while working on #255
Resolving this in a patch/minor release will be a breaking change for anyone using --fix-dry-run in their builds (any environment where the exit code has an impact on outcome) when they update the linter.
But since the fix-related options are primarily used during local development, I don't think this would impact a lot of users.
Issue is open for discussion on whether we should fix this in a patch/minor release or not.
Priority High
The text was updated successfully, but these errors were encountered:
if you eliminate all errors (either using the fixer or simply removing them from soliumrc), it will return 0 which it shouldn't because errors are still there (fix-dry-run simply removes them in-memory, not permanently)
Description
If
--fix-dry-run
fixes all the linterror
s in the code, the linter exits with0
. This is wrong behaviour because dry run doesn't permanently fix those errors in the code, so linter should still consider them when exiting with a code.Steps to reproduce
For the sake of simplicity,
sample.sol
should contain 1 fixable lint issue (eg-quotes
-related issue)..soliumrc.json
should mark this issue's rule as anerror
.Run
solium -f sample.sol --fix-dry-run
Then check the exit code in bash
echo $?
Output:
0
Expected behavior
Exit code should be > 0 because the error still exists in the code.
Operating System
Platform-independent
Linter version
1.2.2
Comments
This issue was discovered while working on #255
Resolving this in a patch/minor release will be a breaking change for anyone using
--fix-dry-run
in their builds (any environment where the exit code has an impact on outcome) when they update the linter.But since the fix-related options are primarily used during local development, I don't think this would impact a lot of users.
Issue is open for discussion on whether we should fix this in a patch/minor release or not.
Priority
High
The text was updated successfully, but these errors were encountered: