Skip to content
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

Ensure verifyGeneratorOutput task checks necessary files #5489

Merged
merged 2 commits into from Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 13 additions & 4 deletions detekt-generator/build.gradle.kts
Expand Up @@ -88,16 +88,25 @@ val generateDocumentation by tasks.registering(JavaExec::class) {

val verifyGeneratorOutput by tasks.registering(Exec::class) {
dependsOn(generateDocumentation)
description = "Verifies that the default-detekt-config.yml is up-to-date"
commandLine = listOf("git", "diff", "--quiet", defaultConfigFile, deprecationFile)
description = "Verifies that generated config files are up-to-date"
commandLine = listOf(
"git",
"diff",
"--quiet",
defaultConfigFile,
formattingConfigFile,
librariesConfigFile,
ruleauthorsConfigFile,
deprecationFile,
)
isIgnoreExitValue = true

doLast {
if (executionResult.get().exitValue == 1) {
throw GradleException(
"The default-detekt-config.yml is not up-to-date. " +
"At least one generated configuration file is not up-to-date. " +
"You can execute the generateDocumentation Gradle task " +
"to update it and commit the changed files."
"to update generated files then commit the changes."
)
}
}
Expand Down
4 changes: 2 additions & 2 deletions detekt-rules-ruleauthors/src/main/resources/config/config.yml
@@ -1,6 +1,6 @@
ruleauthors:
active: true
ViolatesTypeResolutionRequirements:
active: true
UseEntityAtName:
active: true
ViolatesTypeResolutionRequirements:
active: true