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

CI reported detekt-formatting issue that wasn't found locally #6111

Closed
TWiStErRob opened this issue May 19, 2023 · 2 comments
Closed

CI reported detekt-formatting issue that wasn't found locally #6111

TWiStErRob opened this issue May 19, 2023 · 2 comments

Comments

@TWiStErRob
Copy link
Member

Expected Behavior

Local gradlew detekt* finds the same problems as CI

Observed Behavior

Check out e2a3af0 from #5981 and run detekt on it offline -> no findings.

https://github.com/detekt/detekt/security/code-scanning/7293 -> found by CI.

Steps to Reproduce

In detekt-rules-style/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/style/ForbiddenComment.kt replace method with

    private fun getErrorMessage(value: String): String =
        @Suppress("DEPRECATION")
        customMessage.takeUnless { it.isEmpty() } ?: String.format("DEFAULT_ERROR_MESSAGE__%s__NO_REASON", value)

(It doesn't make much sense, but hopefully it should repro if this is pushed in a PR.)

Context

Hi, @TWiStErRob do you know why this didn't get caught when I ran the ./gradlew detektMain detektTest detektTestFixtures apiDump generateDocumentation compileKotlin compileTestKotlin compileTestFixturesKotlin -PwarningsAsErrors=true --parallel command locally? Running the command successfully passed on my local

Originally posted by @atulgpt in #5981 (comment)

Your Environment

@detekt-ci
Copy link
Collaborator

This issue is stale because it has been open 90 days with no activity. Please comment or this will be closed in 7 days.

@detekt-ci
Copy link
Collaborator

This issue was closed because it has been stalled for 7 days with no activity.

@detekt-ci detekt-ci closed this as not planned Won't fix, can't repro, duplicate, stale Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants