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

Fix small corner-case in "SerialVersionUIDInSerializableClass" rule, … #7346

Conversation

PStrelchenko
Copy link
Contributor

…when property was declared inside private object.

Your serialVersionUID could be declared inside private companion object, and in this case SerialVersionUIDInSerializableClass rule should not raise any violations, as declared property is private.

class MyClass : Serializable {
     private companion object {
          const val serialVersionUID = 1L // should be OK for "SerialVersionUIDInSerializableClass" rule
     }
}

…when property was declared inside private object.
@detekt-ci detekt-ci added the rules label Jun 5, 2024
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.31%. Comparing base (1fc18fc) to head (3c6c42b).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #7346   +/-   ##
=========================================
  Coverage     84.31%   84.31%           
- Complexity     4149     4151    +2     
=========================================
  Files           573      573           
  Lines         11888    11889    +1     
  Branches       2458     2459    +1     
=========================================
+ Hits          10023    10024    +1     
  Misses          613      613           
  Partials       1252     1252           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BraisGabin BraisGabin merged commit a896408 into detekt:main Jun 9, 2024
21 checks passed
@detekt-ci
Copy link
Collaborator

Warnings
⚠️ This PR is approved with no milestone set. If merged, it won't appear in the detekt release notes.

Generated by 🚫 dangerJS against 3c6c42b

@BraisGabin BraisGabin added the pick request Marker for PRs that should be ported to the 1.0 release branch label Jun 9, 2024
@BraisGabin BraisGabin added this to the 2.0.0 milestone Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pick request Marker for PRs that should be ported to the 1.0 release branch rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants