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

[julia] CPD: Add support for Julia code duplication #4403

Merged
merged 15 commits into from
Apr 29, 2023

Conversation

wener-tiobe
Copy link
Contributor

Describe the PR

Added support for code duplication analysis on Julia code.
See https://julialang.org/ for more information on Julia

Related issues

None

  • Fixes #

Ready?

  • [v ] Added unit tests for fixed bug/feature
  • [v ] Passing all unit tests
  • [ v] Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • [v ] Added (in-code) documentation (if needed)

Copy link
Member

@oowekyala oowekyala left a 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!

pom.xml Outdated Show resolved Hide resolved
@@ -0,0 1,163 @@
grammar Julia;
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

docs/pages/pmd/languages/julia.md Outdated Show resolved Hide resolved
Replaced tab with spaces
Removed unneeded comments
@pmd-test
Copy link

1 Message
📖 No regression tested rules have been changed.

Generated by 🚫 Danger

Updated grammar. Updated unittest accordingly.
Removed reintroduced comments
@adangel adangel added a:new-language Proposal to add a new PMD or CPD language to the main distribution in:cpd Affects the copy-paste detector in:grammar About the grammar of a lexer or parser, eg, a parse/lex exception labels Mar 2, 2023
@adangel adangel changed the title Added support for Julia code duplication. Add support for Julia code duplication Mar 2, 2023
@adangel adangel changed the title Add support for Julia code duplication CPD: Add support for Julia code duplication Apr 4, 2023
@oowekyala oowekyala self-assigned this Apr 25, 2023
@oowekyala oowekyala changed the title CPD: Add support for Julia code duplication [julia] CPD: Add support for Julia code duplication Apr 29, 2023
oowekyala added a commit that referenced this pull request Apr 29, 2023
@oowekyala oowekyala merged commit 4d899b9 into pmd:master Apr 29, 2023
@oowekyala
Copy link
Member

Merged, thanks!

@oowekyala oowekyala added this to the 7.0.0 milestone Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:new-language Proposal to add a new PMD or CPD language to the main distribution in:cpd Affects the copy-paste detector in:grammar About the grammar of a lexer or parser, eg, a parse/lex exception
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants