Repository navigation
Closed
Description
Adding a new static code analyzer for Kotlin: https://detekt.dev/
TASKS
- Research (if needed)
- Create branch feature/detekt
- Initial set up of the tool
- First try to integrate in CI (github actions)
- Launch the analyzer to get an initial set of existing code smells
- Analyze the code smells and decide what to do with them
- Check if more rules should be added or removed from the set of existing rules
- Fix all code smells:
- MaxLineLength: max 150 characters per line -> CR ✅
- LongMethod: refactor all methods with more than 100 lines -> CR ✅
- UnusedPrivateMember -> CR ✅
- UnusedPrivateProperty -> CR ✅
- UseIfInsteadOfWhen -> CR ✅
- UseLet -> CR ✅
- SpacingBetweenPackageAndImports -> CR ✅
- ExplicitItLambdaParameter (data module) -> CR ✅
- CollapsibleIfStatements -> CR ✅
- UnusedParameter -> CR ✅
- InvalidPackageDeclaration -> CR ✅
- ExpressionBodySyntax -> CR ✅
- NewLineAtEndOfFile -> CR ✅
- MemberNameEqualsClassName -> CR ✅
- ForbiddenComment -> CR ✅
- WildCardImport -> CR ✅
- VariableNaming -> CR ✅
- EmptySecondaryConstructor -> CR ✅
- NotImplementedDeclaration -> CR ✅
- MandatoryBracesLoops -> CR ✅
- ClassOrdering -> CR ✅
- MatchingDeclarationName -> CR ✅
- ImplicitDefaultLocale -> CR ✅
- SpreadOperator (in migrations, add ALLMIGRATIONS to array directly) -> CR ✅
- UtilityClassWithPublicConstructor -> CR ✅
- OptionalUnit -> CR ✅
- BracesOnIfStatements -> CR ✅
- BracesOnWhenStatements -> CR ✅
- AlsoCouldBeApply -> CR ✅
- SwallowedException -> CR ✅
- PrintStackTrace -> CR ✅
- InstanceOfCheckForException -> CR ✅
- ConstructorParameterNaming -> CR ✅
- ThrowingExceptionsWithoutMessageOrCause -> CR ✅
- ComplexCondition -> CR ✅
- Final CI setup (correct branching and setup ready to go)
- No code smells -> green CI
- Add Calens file
- Code review and apply changes requested
- Merge branch feature/detekt into master
Activity
jesmrec commentedon Oct 30, 2024
Some dependency on #4478.
Gradle version to push on, will determine the basic detekt version to use
[-]Detekt: static code analyzer[/-][+][TECHINICAL] Detekt: static code analyzer[/+][-][TECHINICAL] Detekt: static code analyzer[/-][+][TECHNICAL] Detekt: static code analyzer[/+]jesmrec commentedon Dec 4, 2024
Some rules did not return code smells, but they were candidates. They might deserve a look: