-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request snyk#955 from snyk/feat/exclude-auto-detect
feat: add exclude arg and use to ignore
- Loading branch information
Showing
12 changed files
with
182 additions
and
6 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
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,13 @@ | ||
import { CustomError } from './custom-error'; | ||
|
||
export class ExcludeFlagBadInputError extends CustomError { | ||
private static ERROR_CODE = 422; | ||
private static ERROR_MESSAGE = | ||
'Empty --exclude argument. Did you mean --exclude=subdirectory ?'; | ||
|
||
constructor() { | ||
super(ExcludeFlagBadInputError.ERROR_MESSAGE); | ||
this.code = ExcludeFlagBadInputError.ERROR_CODE; | ||
this.userMessage = ExcludeFlagBadInputError.ERROR_MESSAGE; | ||
} | ||
} |
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,13 @@ | ||
import { CustomError } from './custom-error'; | ||
|
||
export class ExcludeFlagInvalidInputError extends CustomError { | ||
private static ERROR_CODE = 422; | ||
private static ERROR_MESSAGE = | ||
'The --exclude argument must be a comma seperated list of directory names and cannot contain a path.'; | ||
|
||
constructor() { | ||
super(ExcludeFlagInvalidInputError.ERROR_MESSAGE); | ||
this.code = ExcludeFlagInvalidInputError.ERROR_CODE; | ||
this.userMessage = ExcludeFlagInvalidInputError.ERROR_MESSAGE; | ||
} | ||
} |
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,10 @@ | ||
import { CustomError } from './custom-error'; | ||
|
||
export class OptionMissingErrorError extends CustomError { | ||
constructor(option: string, required: string) { | ||
const msg = `The ${option} option can only be use in combination with ${required}.`; | ||
super(msg); | ||
this.code = 422; | ||
this.userMessage = msg; | ||
} | ||
} |
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
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