Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Verify detekt config #90

Merged
merged 4 commits into from Feb 15, 2018
Merged

Verify detekt config #90

merged 4 commits into from Feb 15, 2018

Conversation

tasomaniac
Copy link
Contributor

Fixes #70

Problem

We don't verify the tools configurations but maybe we should in some cases. In this particular case, output is optional in detekt and in such case, it just prints to console and skips generating file reports.

When this happens, our plugin fails with an exception while running with not so clear error message.

Solution

Check if the output is defined.

Tests

  • Added a test case around the issue.
  • Moved configuration related tests together.
  • Little more boy-scouting in the test.

Copy link
Contributor

@mr-archano mr-archano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit

@@ -25,6 +28,26 @@ class DetektIntegrationTest {
this.projectRule = projectRule
}

@Test
void givenOutputNotDefinedShouldFailBuildOnConfiguration() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the name of this test could be shouldFailBuildOnConfigurationWhenOutputNotDefined

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha 😃The test name was like that in the beginning actually.

@mr-archano mr-archano merged commit 7a5c4c1 into develop Feb 15, 2018
@mr-archano mr-archano deleted the 70/verify-detekt-config branch February 15, 2018 17:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants