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

Update MagicNumber rule to exclude .kts files #4877

Merged
merged 2 commits into from May 31, 2022
Merged

Update MagicNumber rule to exclude .kts files #4877

merged 2 commits into from May 31, 2022

Conversation

schalkms
Copy link
Member

The MagicNumber rule should not be enforced in script files,
because you cannot have constants in these files.

Closes #4863

The MagicNumber rule should not be enforced in script files,
because you cannot have constants in these files.

Closes #4863
@BraisGabin
Copy link
Member

This file is autogenerated, it is not that easy to add this change.

cortinico
cortinico previously approved these changes May 31, 2022
@cortinico cortinico dismissed their stale review May 31, 2022 18:25

Follow up from Brais

@cortinico
Copy link
Member

Yup @BraisGabin is right. Though this might help:

private object KotlinScriptExclusions : Exclusions() {
override val pattern = "['**/*.kts']"
override val rules = setOf("MissingPackageDeclaration")
}

(not sure if we merge exclusions though)

@cortinico cortinico added this to the 1.21.0 milestone May 31, 2022
@github-actions github-actions bot removed the rules label May 31, 2022
@schalkms
Copy link
Member Author

Thanks for the hint, guys. I hadn't changed something in the Exclusion filter for a long time. 😊
I wanted to quickly fix this issue while being on mobile. I guess this plan didn't work out that well.

This file is autogenerated, it is not that easy to add this change.

@schalkms schalkms merged commit f66a321 into main May 31, 2022
@schalkms schalkms deleted the schalkms-#4863 branch May 31, 2022 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MagicNumber rule should not be enforced in kotlin script files
3 participants