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

Refactor false positives fix #183

Merged
merged 3 commits into from
Jul 7, 2022
Merged

Conversation

LukaszKontowski
Copy link
Contributor

Closes #171

  • switched from direct checks on files in user's source code to usage of global.findMemberFromRoot method
  • stopped relying on better-files in the published code
  • stopped publishing fat jars for codec registration checker compiler plugin

@LukaszKontowski LukaszKontowski added code quality Code quality codecs Relates to useful/missing Circe codec (regardless of Akka serialization) labels Jul 7, 2022
@LukaszKontowski LukaszKontowski self-assigned this Jul 7, 2022
mode match {
case DumpTypesIntoFile =>
outParentChildFQCNPairs = ((parentChildFQCNPairsFromCacheFile -- classSweepFQCNPairsToUpdate) |
classSweepFoundFQCNPairs).toList
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hm, it looks like sbt scalafmtAll scalafixAll deleted two spaces that were before classSweepFoundFQCNPairs).toList ... It still works as expected but does not look great without this indent

@LukaszKontowski LukaszKontowski changed the title Refactor false positives Refactor false positives fix Jul 7, 2022

fullyQualifiedClassNames.filter(typeIsDefinedInScalaFiles)
def typeIsDefinedInSourceCode(fqcn: String): Boolean =
global.findMemberFromRoot(TypeName(fqcn)) match {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The Trick ™️

Copy link
Collaborator

@PawelLipski PawelLipski left a comment

Choose a reason for hiding this comment

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

Looks good to me! 🎉

@LukaszKontowski LukaszKontowski merged commit 5ee9abd into main Jul 7, 2022
@LukaszKontowski LukaszKontowski deleted the refactor_false_positives branch July 7, 2022 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Code quality codecs Relates to useful/missing Circe codec (regardless of Akka serialization)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor existing solution for false-positive No codecs for ... registered errors
2 participants