-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat: Enabling SCLE [NEBULA-1371] #447
Conversation
e9b5337
to
4558d57
Compare
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.
detekt found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
7c17b25
to
ff0bba8
Compare
0b728e2
to
ad0a05e
Compare
src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt
Outdated
Show resolved
Hide resolved
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.
Good job, just some small changes requested :)
Signed-off-by: Matthew Barbara <[email protected]>
@@ -29,11 +31,22 @@ class SnykApiClient( | |||
log.debug("Executing request to $apiName") | |||
val response = retrofitCall.execute() | |||
if (!response.isSuccessful) { | |||
if (response.code() == HttpStatusCode.UnprocessableEntity.value) { | |||
val responseBodyString = response.errorBody()?.string() | |||
val errorBody= Gson().fromJson<CliConfigSettingsError?>(responseBodyString, CliConfigSettingsError::class.java) |
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.
Please fix the linter stuff :)
@@ -48,7 +48,9 @@ class SnykApplicationSettingsStateService : PersistentStateComponent<SnykApplica | |||
var containerScanEnabled: Boolean = true | |||
|
|||
var sastOnServerEnabled: Boolean? = null | |||
var sastSettingsError: Boolean? = null; |
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.
linter :)
@@ -219,25 +221,34 @@ class ScanTypesPanel( | |||
return | |||
} | |||
|
|||
var sastSettingsError: String = "" | |||
val sastCliConfigSettings: CliConfigSettings? = | |||
try { |
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.
linter :)
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.
Nice! Only linting and a changelog entry are missing.
Signed-off-by: Matthew Barbara <[email protected]>
import io.mockk.mockk | ||
import io.mockk.every | ||
import io.mockk.mockkStatic | ||
import io.mockk.unmockkAll | ||
import junit.framework.TestCase.assertFalse | ||
import junit.framework.TestCase.assertTrue | ||
import org.hamcrest.core.IsEqual.equalTo | ||
import org.junit.Assert.assertThat | ||
import org.junit.Test | ||
import org.junit.Before | ||
import java.net.URI | ||
import io.snyk.plugin.pluginSettings | ||
import io.snyk.plugin.services.SnykApplicationSettingsStateService | ||
import junit.framework.TestCase.assertEquals | ||
import org.junit.After |
Check warning
Code scanning / detekt
Detects imports in non default order
Signed-off-by: Matthew Barbara <[email protected]>
Signed-off-by: Matthew Barbara <[email protected]>
d2c8e55
to
2db4deb
Compare
Enables SCLE