Skip to content

Conversation

@hduelme
Copy link
Contributor

@hduelme hduelme commented Dec 22, 2024

I added an inspection which reports all unknown mapstruct references as unknown symbol errors. This also works for references with dot notation.
My implemtation is based on https://github.com/JetBrains/intellij-community/blob/master/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/references/InjectedReferencesInspection.java.

I added tests for all mapstruct references:

  • source in @Mapping annotation
  • target in @Mapping annotation
  • source in @ValueMapping annotation
  • target in @ValueMapping annotation
  • qualifiedByName in @Mapping annotation

For nested targets the inspection looks like
grafik

fixes #178

@hduelme
Copy link
Contributor Author

hduelme commented Dec 22, 2024

This should fix #178

@filiphr filiphr merged commit cf8d6b6 into mapstruct:main Jan 18, 2025
6 checks passed
@filiphr
Copy link
Member

filiphr commented Jan 18, 2025

Nice work on this @hduelme

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.

Report Non-existing target properties as errors

2 participants