-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MBS-9781 alert to slack about lint errors (#621)
* MBS-9781 alert to slack about lint errors
- Loading branch information
Showing
18 changed files
with
2,224 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sonar.exclusions=**/integTest/resources/*.* |
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
27 changes: 27 additions & 0 deletions
27
.../lint-report/src/integTest/kotlin/com/avito/android/lint/LintSlackAlertIntegrationTest.kt
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,27 @@ | ||
package com.avito.android.lint | ||
|
||
import com.avito.slack.SlackClient | ||
import com.avito.slack.model.SlackChannel | ||
import com.avito.utils.logging.CILogger | ||
import org.junit.jupiter.api.Test | ||
import java.io.File | ||
|
||
internal class LintSlackAlertIntegrationTest { | ||
|
||
private val testChannel = SlackChannel(requireNotNull(System.getProperty("avito.slack.test.channel"))) | ||
private val testToken = requireNotNull(System.getProperty("avito.slack.test.token")) | ||
private val workspace = requireNotNull(System.getProperty("avito.slack.test.workspace")) | ||
private val slackClient: SlackClient = SlackClient.Impl(testToken, workspace) | ||
private val logger: CILogger = CILogger.allToStdout | ||
|
||
@Test | ||
fun integrationTest() { | ||
val parser = LintResultsParser(File("src/integTest/resources"), logger) | ||
|
||
val reportModels = parser.parse() | ||
|
||
val lintSlackReporter: LintSlackReporter = LintSlackReporter.Impl(slackClient, logger) | ||
|
||
lintSlackReporter.report(reportModels, testChannel) | ||
} | ||
} |
Oops, something went wrong.