Skip to content

Commit

Permalink
fix e2e v1
Browse files Browse the repository at this point in the history
  • Loading branch information
dbale-altoros committed May 11, 2024
1 parent 8ab9533 commit d86157f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
## [5.0.0] - 2024-05-11
### BREAKING CHANGES

#### Solhint EXIT codes
Solhint changed how the exit codes are implemented:

`Exit with 0 code` When execution was ok and there were no errors when evaluating the code according to the rules<br>
`Exit with 1 code` When execution was ok and there are errors reported<br>
`Exit with 1 code` When execution was ok and max warnings is lower than the reported warnings<br>
`Exit with 255 code` When there's an error in the execution (bad config, writing not allowed, wrong parameter, file not found, etc)<br>

#### Solhint QUIET mode
QUIET mode (-c quiet) option now works with the warnings and may exit with 1 if there are more than defined by user


<br><br>
## [4.5.4] - 2024-04-10
### Fixed
- `gas-custom-errors` improved logic to ranged pragma versions [#573](https://github.com/protofire/solhint/pull/573)
Expand Down
2 changes: 1 addition & 1 deletion e2e/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ describe('e2e', function () {
expect(stdout.trim()).to.not.contain(errorFound)
})

it('should NOT display warningns nor error but exit with 1 because max is 3 warnings', function () {
it('should NOT display warnings nor error but exit with 1 because max is 3 warnings', function () {
const { code } = shell.exec(
`${NODE}solhint ${PREFIX}contracts/Foo.sol --max-warnings 3 ${SUFFIX} -q`
)
Expand Down
1 change: 0 additions & 1 deletion solhint.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ function printReports(reports, formatter) {
if (program.opts().save) {
writeStringToFile(fullReport)
}
console.log('maxWarnsFound :>> ', maxWarnsFound)
if (maxWarnsFound) process.exit(EXIT_CODES.REPORTED_ERRORS)
return reports
}
Expand Down

0 comments on commit d86157f

Please sign in to comment.