diff --git a/package.json b/package.json index 61b0385..94b298c 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/main.ts b/src/main.ts index b87015e..8b5d3ca 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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 {