-
Notifications
You must be signed in to change notification settings - Fork 4
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
ANDROID-11179 detekt implementation #386
Merged
jmanriquehiberus
merged 27 commits into
main
from
jmanrique/ANDROID-11179-enable-detekt-in-mistica-android
Sep 24, 2024
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
23291e2
ANDROID-11179 detekt implementation
jmanriquehiberus fd59062
ANDROID-11179 using detekt's last version
jmanriquehiberus 6baac3a
ANDROID-11179 excluding files beneath .gradle, build & tmp
jmanriquehiberus 60f8f91
ANDROID-11179 deprecated input replaced with basePath, and now excludβ¦
jmanriquehiberus 6c144d6
ANDROID-11179 non deprecated config setting
jmanriquehiberus fe5535a
ANDROID-11179 interface name capitalisation to meet detekt requirements
jmanriquehiberus 01bc970
ANDROID-11179 for loop replaced with repeat in order to fix detekt isβ¦
jmanriquehiberus 5d18440
ANDROID-11179 unused imports removed
jmanriquehiberus e5ff9b8
ANDROID-11179 too long line detekt issue fixed
jmanriquehiberus b26150e
ANDROID-11179 multiple variable declaration detekt issue fixed
jmanriquehiberus 75c1a6e
ANDROID-11179 calling error function instead of throwing exception inβ¦
jmanriquehiberus 46d4262
ANDROID-11179 putting composable functions first in order to avoid reβ¦
jmanriquehiberus 4edc4f2
ANDROID-11179 empty constructor removed
jmanriquehiberus c9afd31
ANDROID-11179 detekt issues fixed LongMethod, CyclomaticComplexMethod
jmanriquehiberus 590835e
ANDROID-11179 detekt issues fixed SwallowedException
jmanriquehiberus 1584599
ANDROID-11179 detekt issue fixed: CyclomaticComplexMethod
jmanriquehiberus bfdfbac
ANDROID-11179 detekt issue fixed: LongMethod
jmanriquehiberus b20c76b
ANDROID-11179 detekt added to tests.yml
jmanriquehiberus 910fdad
ANDROID-11179 unused import removed
jmanriquehiberus 533c04d
ANDROID-11179 too long line issue fixed and detekt issues with configβ¦
jmanriquehiberus 81399b7
ANDROID-11179 detekt issues suppressed until further notice (jira ticβ¦
jmanriquehiberus 0e9f6c7
ANDROID-11179 code cleanup
jmanriquehiberus bada90c
ANDROID-11179 detekt-baseline.xml removed
jmanriquehiberus ee638a9
ANDROID-11179 error prone icon replaced with stable one
jmanriquehiberus e93dd76
Merge branch 'main' of github.com:Telefonica/mistica-android into jmaβ¦
jmanriquehiberus 3ff5363
ANDROID-11179 link to the library updated
jmanriquehiberus 8305ea3
ANDROID-11179 LongMethod issue ignored on Composable annotated functions
jmanriquehiberus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
detekt { | ||
buildUponDefaultConfig = true | ||
config.from(files("$projectDir/build-tools/detekt/detekt.yml")) | ||
basePath = files("$projectDir") | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could exclude some folders like:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True, just did it, thanks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
complexity: | ||
TooManyFunctions: | ||
active: false | ||
LongParameterList: | ||
active: false | ||
LongMethod: | ||
ignoreAnnotated: 'Composable' | ||
|
||
|
||
style: | ||
NewLineAtEndOfFile: | ||
active: false | ||
MagicNumber: | ||
active: false | ||
ReturnCount: | ||
active: false | ||
UnusedImports: | ||
active: true | ||
MaxLineLength: | ||
maxLineLength: 160 | ||
UnusedPrivateMember: | ||
ignoreAnnotated: 'Preview' | ||
UnnecessaryAbstractClass: | ||
ignoreAnnotated: "Module" | ||
|
||
naming: | ||
FunctionNaming: | ||
active: true | ||
ignoreAnnotated: 'Composable' | ||
|
||
empty-blocks: | ||
EmptyFunctionBlock: | ||
active: false | ||
|
||
exceptions: | ||
TooGenericExceptionThrown: | ||
active: false | ||
TooGenericExceptionCaught: | ||
active: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
No files to adapt in mistica after adding detekt? Did you check this is executed with the ./gradlew check command? (which is the one executed on preintegration GA)
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.
Yes, there are 96 issues to address after running detekt.
I am sorry but could not find any preintegration GA in mistica, should there be or should we include detekt in any GA? π€
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 the tests.yml file, the checks which are run on each PR commit, detekt should run as part of them.
Normally, when invoking "check" gradle target (executed on that GA), detekt is also executed with just applying the plugin, but please check it just to ensure it.
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.
In order to add detekt we need to also fix the current issues repository has (or ignoring them someway to do that work afterwards), if it's too complicated, please check with the team how to proceed on next weekly or by chat (I'm on vacations next week).
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.
Okay. By now, I have addressed 53 issues and still have 43 to be fixed (most of them related to long functions or too complex functions). I will address simpler issues alone and will keep potentially troublesome ones to be tackled along with the team.