Skip to content

Conversation

@JonasVautherin
Copy link
Collaborator

This adds the detekt linter and addresses the warnings.

Notes:

  • I copied the default config from here in order to edit it. The two edits I made are here:
    • I deactivated the TooManyFunctions error that was complaining about LoggerImpl.kt having 63 functions.
    • I deactivated the WildcardImport that prevents... well wildcard imports

@github-actions
Copy link

Dependency Review

✅ No vulnerabilities or OpenSSF Scorecard issues found.

Scanned Files

None

active: true
ignoreLateinitVar: false
WildcardImport:
active: false
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I disabled this one because our imports come from spotless, and I don't have an opinion against wildcard imports so it didn't seem worth changing spotless for that.

excludeStringsWithLessThan5Characters: true
ignoreStringsRegex: '$^'
TooManyFunctions:
active: false
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I disabled TooManyFunctions because... well I think we can handle it ourselves with common sense.

# - 'ClassCountProcessor'
# - 'FunctionCountProcessor'
# - 'PropertyCountProcessor'
# - 'ProjectComplexityProcessor'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm curious what this one is!

value: 'FIXME:'
- reason: 'Forbidden STOPSHIP todo marker in comment, please address the problem before shipping the code.'
value: 'STOPSHIP:'
- reason: 'Forbidden TODO todo marker in comment, please do the changes.'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Code will break real soon! 🔥 We'll probably need to remove some in our main project and actually file tickets for them - which isnt necessisarily a bad thing.

while (parser.next() != XmlPullParser.END_TAG) {
if (parser.eventType == XmlPullParser.END_DOCUMENT) {
throw RuntimeException("Invalid config file!")
error("Invalid config file!")
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's cool to see how it's already making things more idomatic

Copy link
Collaborator

@AdamWardVGP AdamWardVGP left a comment

Choose a reason for hiding this comment

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

Looks good, it's interesting to see all the things we can set!

@JonasVautherin JonasVautherin merged commit 8ee90e8 into main Aug 28, 2025
6 checks passed
@JonasVautherin JonasVautherin deleted the add-detekt branch August 28, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants