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
Add Kotlin AvoidRecreatingDateTimeFormatter #304
base: master
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
<value> | ||
<![CDATA[ | ||
(: check if java.text imports exists as filter for same named classes in other packages :) | ||
//ImportHeader[.//T-Identifier[@Text='org'] and .//T-Identifier[@Text='joda'] and .//T-Identifier[@Text='time'] and .//T-Identifier[@Text='format']][1]/ancestor::KotlinFile |
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.
is this about java.text (1st line) or joda.time (2nd line)?
Should it not hold for both cases? So match on at least one of them?
Include threeten.bp.format? Maybe not, old.
} | ||
} | ||
]]></code> | ||
</test-code> |
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.
Can you add a separate test-code with just java.time import? (no joda.time)
and one without joda.time and without java.time and a custom DateTimeFormatter so without violation?
Works on basic unit tests.
Should we create more unit tests to avoid false positives and add more Kotlin syntaxes?