Skip to content

Commit d8ce793

Browse files
authored
feat: proper exit statuses (#56)
1 parent a66753b commit d8ce793

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@defi-wonderland/natspec-smells",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"description": "Automatically identify missing or incomplete natspec",
55
"homepage": "https://github.com/defi-wonderland/natspec-smells#readme",
66
"repository": {

Diff for: src/main.ts

+10-9
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@ import { Validator } from './validator';
2222

2323
if (!warnings.length) {
2424
console.warn('No issues found');
25-
return;
26-
}
27-
28-
warnings.forEach(({ location, messages }) => {
29-
console.warn(location);
30-
messages.forEach((message) => {
31-
console.warn(` ${message}`);
25+
return process.exit(0);
26+
} else {
27+
warnings.forEach(({ location, messages }) => {
28+
console.warn(location);
29+
messages.forEach((message) => {
30+
console.warn(` ${message}`);
31+
});
32+
console.warn();
3233
});
33-
console.warn();
34-
});
34+
return process.exit(1);
35+
}
3536
})().catch(console.error);
3637

3738
function getArguments(): Config {

0 commit comments

Comments
 (0)