-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: better error when org is not found for snyk code #2295
Conversation
214659d
to
5da4c73
Compare
|
@@ -17,7 +17,7 @@ import { jsonStringifyLargeObject } from '../../../../src/lib/json'; | |||
import { ArgsOptions } from '../../../../src/cli/args'; | |||
|
|||
const { getCodeAnalysisAndParseResults } = analysis; | |||
const osName = require('os-name'); | |||
import osName = require('os-name'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
required: this looks like a typo. import and require
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a typo, it's a way of importing es modules that use export =
src/lib/plugins/sast/validate.ts
Outdated
@@ -16,7 +18,6 @@ export async function validateCodeTest(options: Options) { | |||
} | |||
|
|||
// TODO: We would need to remove this once we fix circular import issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: kill this line as well?
What does this PR do?
This PR shows better error when org is not found for user (instead of showing "Snyk code is not enabled for org")
Where should the reviewer start?
How should this be manually tested?
run
snyk code test --org=foo
with this PRAny background context you want to provide?
What are the relevant tickets?
https://snyksec.atlassian.net/browse/COD-556?atlOrigin=eyJpIjoiMTBlZjliODkxMjM4NGVkNjgzMGEyZmE5M2NkMDExMWMiLCJwIjoiaiJ9
Screenshots
Additional questions