Skip to content
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

Backend: Detekt Fixes Part 8 #2734

Merged
merged 10 commits into from
Oct 18, 2024

Conversation

DavidArthurCole
Copy link
Contributor

@DavidArthurCole DavidArthurCole commented Oct 14, 2024

What

Fixes all instances of ALL detektions, including regressions since the HEADs of #2667 and #2657. Mainly the following:

  • CustomCommentSpacing (regression)
  • AvoidBritishSpelling (regression)
  • CyclomaticComplexMethod
  • LargeClass (regression)
  • LongMethod (regression)
  • PrintStackTrace (regression)
  • ImportOrdering/NoUnusedImports
  • Indentation (regression)
  • NoMultipleSpaces (regression)
  • NoTrailingSpaces (regression)
  • PropertyWrapping (regression)
  • SpacingAroundKeyword (regression)
  • StringTemplate (regression)
  • Wrapping (regression)
  • FunctionNaming
  • FunctionParameterNaming
  • MemberNameEqualsClassName (regression)
  • ObjectPropertyNaming
  • ArrayPrimitive (regression)
  • ForEachOnRange
  • SpreadOperator
  • IteratorNotThrowingNoSuchElementException
  • MapGetWithNotNullAssertionOperator
  • DestructuringDeclarationWithTooManyEntries
  • MaxLineLength (regression)
  • ReturnCount (regression)
  • UnusedParameter
  • UnusedPrivateProperty
  • UseAnyOrNoneInsteadOfFind (regression)
  • UseOrEmpty - Main factor, 114 detektions at HEAD
  • UtilityClassWithPublicConstructor
  • VarCouldBeVal

Detektion count down to 0 from 261 at HEAD.

This PR also enables detekt running during the build process, and detektMain running during the Pull Request build process. If/when this gets merged, detekt will be fully enabled.

Changelog Technical Details

  • Added groupOrEmpty to MatchMatcher. - Daveed
    • Preferably use this method instead of groupOrNull("[group]").orEmpty()

@github-actions github-actions bot added Backend A backend pull request that will be merged soon Wrong Title/Changelog There is an error in the title or changelog labels Oct 14, 2024
Copy link

I have detected some issues with your pull request:

Body issues:
Author is not set in text: + Added groupOrEmpty to MatchMatcher
Change should end with a full stop in text: Added groupOrEmpty to MatchMatcher

Please fix these issues. For the correct format, refer to the pull request template.

@github-actions github-actions bot removed the Wrong Title/Changelog There is an error in the title or changelog label Oct 14, 2024
@DavidArthurCole
Copy link
Contributor Author

There's seemingly an issue with specifically 1.12.2 detekt running and failing in the multi version build. Will look into this...

@github-actions github-actions bot added the Merge Conflicts There are open merge conflicts with the beta branch. label Oct 14, 2024
Copy link

This pull request has conflicts with the base branch "beta". Please resolve those so we can test out your changes.

@github-actions github-actions bot removed the Merge Conflicts There are open merge conflicts with the beta branch. label Oct 14, 2024
Copy link

Conflicts have been resolved! 🎉

@CalMWolfs CalMWolfs added the Soon This Pull Request will be merged within the next couple of betas label Oct 14, 2024
@CalMWolfs CalMWolfs added this to the Version 0.28 milestone Oct 14, 2024
Copy link
Collaborator

@CalMWolfs CalMWolfs left a comment

Choose a reason for hiding this comment

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

code changes look fine

@github-actions github-actions bot added the Merge Conflicts There are open merge conflicts with the beta branch. label Oct 18, 2024
Copy link

This pull request has conflicts with the base branch "beta". Please resolve those so we can test out your changes.

Copy link

Conflicts have been resolved! 🎉

@github-actions github-actions bot removed the Merge Conflicts There are open merge conflicts with the beta branch. label Oct 18, 2024
@hannibal002 hannibal002 added test and removed test labels Oct 18, 2024
@hannibal002 hannibal002 merged commit 7d3e61c into hannibal002:beta Oct 18, 2024
5 checks passed
@github-actions github-actions bot removed the Soon This Pull Request will be merged within the next couple of betas label Oct 18, 2024
@github-actions github-actions bot removed the Backend A backend pull request that will be merged soon label Oct 18, 2024
@DavidArthurCole DavidArthurCole deleted the DetektPartEight branch October 19, 2024 01:27
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