Skip to content

Commit

Permalink
feat: exit with status 1 if natspec is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent committed Aug 19, 2024
1 parent a66753b commit 7083896
Showing 1 changed file with 10 additions and 9 deletions.
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 7083896

Please sign in to comment.