-
Notifications
You must be signed in to change notification settings - Fork 26
Create rule FullyQualifiedImportCheck #287
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
Create rule FullyQualifiedImportCheck #287
Conversation
8ca49b4 to
2927b16
Compare
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.
Hi @EduardoVaz06, thanks for this contribution! Looks great and will be a useful rule for codebases looking to gradually transition to fully qualified imports.
I've made a few comments below, nothing major. Also note that the failing CI is just complaining about the rule having no tags.
...ks/src/main/resources/org/sonar/l10n/delphi/rules/community-delphi/FullyQualifiedImport.json
Outdated
Show resolved
Hide resolved
...ks/src/main/resources/org/sonar/l10n/delphi/rules/community-delphi/FullyQualifiedImport.html
Outdated
Show resolved
Hide resolved
...ks/src/main/resources/org/sonar/l10n/delphi/rules/community-delphi/FullyQualifiedImport.html
Outdated
Show resolved
Hide resolved
delphi-checks/src/main/java/au/com/integradev/delphi/checks/FullyQualifiedImportCheck.java
Outdated
Show resolved
Hide resolved
delphi-checks/src/main/java/au/com/integradev/delphi/checks/FullyQualifiedImportCheck.java
Outdated
Show resolved
Hide resolved
...ks/src/main/resources/org/sonar/l10n/delphi/rules/community-delphi/FullyQualifiedImport.json
Outdated
Show resolved
Hide resolved
delphi-checks/src/main/java/au/com/integradev/delphi/checks/FullyQualifiedImportCheck.java
Outdated
Show resolved
Hide resolved
2927b16 to
19c49d7
Compare
26e5564 to
61f276e
Compare
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.
One last thing to tweak, just formatting consistency in the rule's HTML description.
...ks/src/main/resources/org/sonar/l10n/delphi/rules/community-delphi/FullyQualifiedImport.html
Show resolved
Hide resolved
61f276e to
0a252ea
Compare
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.
Thanks for your contribution!
Feedback addressed, and I've finished reviewing the contribution.
3143498
into
integrated-application-development:master
This PR implements a new rule: FullyQualifiedImportCheck.
As sugested in #62, this rule simply checks if the imports in the UsesClausesNode are fully qualified. If they are not, an issue is raised, suggesting to change it to be fully qualified.