-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
protofire/solhint#554 has changed the solhint behaviour wrt the exit code. This PR is trying to solve the problem.
- Loading branch information
Showing
8 changed files
with
2,509 additions
and
1,124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
diff --git a/solhint.js b/solhint.js | ||
index 755a910c9c084d027520a73b7b989b9b7912a975..53d912394404ee6bc0a4f283da9ee145f1f73d76 100755 | ||
--- a/solhint.js | ||
+++ b/solhint.js | ||
@@ -160,8 +160,7 @@ function executeMainActionLogic() { | ||
|
||
printReports(reports, formatterFn) | ||
|
||
- // exitWithCode(reports) | ||
- process.exit(0) | ||
+ exitWithCode(reports) | ||
} | ||
|
||
function processStdin(options) { | ||
@@ -182,8 +181,7 @@ function processStdin(options) { | ||
const reports = [report] | ||
|
||
printReports(reports, formatterFn) | ||
- process.exit(0) | ||
- // exitWithCode(reports) | ||
+ exitWithCode(reports) | ||
} | ||
|
||
function writeSampleConfigFile() { | ||
@@ -363,10 +361,10 @@ function listRules() { | ||
} | ||
} | ||
|
||
-// function exitWithCode(reports) { | ||
-// const errorsCount = reports.reduce((acc, i) => acc + i.errorCount, 0) | ||
-// process.exit(errorsCount > 0 ? 1 : 0) | ||
-// } | ||
+function exitWithCode(reports) { | ||
+ const errorsCount = reports.reduce((acc, i) => acc + i.errorCount, 0) | ||
+ process.exit(errorsCount > 0 ? 1 : 0) | ||
+} | ||
|
||
function checkForUpdate() { | ||
// eslint-disable-next-line import/no-extraneous-dependencies |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-4.1.1.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.