-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[julia] CPD: Add support for Julia code duplication #4403
Conversation
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 and thanks for the contribution!
pmd-julia/src/test/resources/net/sourceforge/pmd/lang/julia/cpd/testdata/mathExample.txt
Outdated
Show resolved
Hide resolved
pmd-julia/src/main/antlr4/net/sourceforge/pmd/lang/julia/ast/Julia.g4
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,163 @@ | |||
grammar Julia; |
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.
Did you create this grammar yourself? Have you taken a look at this one? It looks more complete, albeit unmaintained
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.
This grammar was made by Paul Jansen from TIOBE. In any case, I'll have a look at the grammar you suggested.
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.
We decided that it is indeed better to take your suggestion as a starting point. It will require some additional work though.
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.
I'd vote for using this grammar for now. We can change it always later on. Right now, it's only used for CPD/tokenization, so there should be no compatibility issues when we change the grammar later.
Replaced tab with spaces
Removed unneeded comments
Generated by 🚫 Danger |
Updated grammar. Updated unittest accordingly.
Removed reintroduced comments
Merged, thanks! |
Describe the PR
Added support for code duplication analysis on Julia code.
See https://julialang.org/ for more information on Julia
Related issues
None
Ready?
./mvnw clean verify
passes (checked automatically by github actions)