-
Notifications
You must be signed in to change notification settings - Fork 0
Add detekt #11
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
Add detekt #11
Conversation
Dependency Review✅ No vulnerabilities or OpenSSF Scorecard issues found.Scanned FilesNone |
| active: true | ||
| ignoreLateinitVar: false | ||
| WildcardImport: | ||
| active: false |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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.' |
There was a problem hiding this comment.
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!") |
There was a problem hiding this comment.
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
AdamWardVGP
left a comment
There was a problem hiding this 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!
This adds the detekt linter and addresses the warnings.
Notes:
TooManyFunctionserror that was complaining about LoggerImpl.kt having 63 functions.WildcardImportthat prevents... well wildcard imports