Skip to content

Commit

Permalink
feat: proper exit statuses (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent authored Aug 21, 2024
1 parent a66753b commit d8ce793
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@defi-wonderland/natspec-smells",
"version": "1.1.4",
"version": "1.1.5",
"description": "Automatically identify missing or incomplete natspec",
"homepage": "https://github.com/defi-wonderland/natspec-smells#readme",
"repository": {
Expand Down
19 changes: 10 additions & 9 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ import { Validator } from './validator';

if (!warnings.length) {
console.warn('No issues found');
return;
}

warnings.forEach(({ location, messages }) => {
console.warn(location);
messages.forEach((message) => {
console.warn(` ${message}`);
return process.exit(0);
} else {
warnings.forEach(({ location, messages }) => {
console.warn(location);
messages.forEach((message) => {
console.warn(` ${message}`);
});
console.warn();
});
console.warn();
});
return process.exit(1);
}
})().catch(console.error);

function getArguments(): Config {
Expand Down

0 comments on commit d8ce793

Please sign in to comment.