Skip to content

Update MagicNumber rule to exclude .kts files#4877

Merged
schalkms merged 2 commits into
mainfrom
schalkms-#4863
May 31, 2022
Merged

Update MagicNumber rule to exclude .kts files#4877
schalkms merged 2 commits into
mainfrom
schalkms-#4863

Conversation

@schalkms

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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