-
Notifications
You must be signed in to change notification settings - Fork 332
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 Golang frontend #500
Add Golang frontend #500
Conversation
# Conflicts: # jplag/pom.xml # jplag/src/main/java/de/jplag/options/LanguageOption.java # jplag/src/test/java/de/jplag/special/TokenPrinterTest.java
The remaining indicated code smells have a point, but they are kind of by design/convention based on the rest of the project. I would argue they are acceptable for now. |
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 added some comments regarding the token selection which seemed worth a discussion for me.
I am not an expert with Go, so there might be totally valid reasons to select the tokens as you did.
jplag.frontend.golang/src/main/java/de/jplag/golang/GoTokenConstants.java
Outdated
Show resolved
Hide resolved
jplag.frontend.golang/src/main/java/de/jplag/golang/GoTokenConstants.java
Outdated
Show resolved
Hide resolved
@jplag/studdev @jplag/maintainer |
The sonar cloud issue is known. I'm working on it in #538 |
@robinmaisch can you merge the current master branch to your branch? |
Done. It works, thanks! |
jplag.frontend.golang/src/main/java/de/jplag/golang/GoParserAdapter.java
Outdated
Show resolved
Hide resolved
jplag.frontend.golang/src/main/java/de/jplag/golang/Language.java
Outdated
Show resolved
Hide resolved
jplag.frontend.golang/src/main/java/de/jplag/golang/grammar/GoParserBase.java
Show resolved
Hide resolved
jplag.frontend.golang/src/main/java/de/jplag/golang/grammar/GoTokenUtils.java
Outdated
Show resolved
Hide resolved
jplag.frontend.golang/src/main/java/de/jplag/golang/grammar/GoTokenUtils.java
Outdated
Show resolved
Hide resolved
jplag.frontend.golang/src/main/antlr4/de/jplag/golang/grammar/GoLexer.g4
Show resolved
Hide resolved
jplag.frontend.golang/src/main/antlr4/de/jplag/golang/grammar/GoParser.g4
Show resolved
Hide resolved
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.
Looks good to me. Resolve the issues mentioned in the other reviews, and this is ready to merge!
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.
Please merge the current main branch to your branch :) error consumer has been removed. A logger is available now :)
jplag.frontend.golang/src/main/java/de/jplag/golang/grammar/GoTokenUtils.java
Outdated
Show resolved
Hide resolved
jplag.frontend.golang/src/main/java/de/jplag/golang/JPlagGoListener.java
Show resolved
Hide resolved
jplag.frontend.golang/src/main/java/de/jplag/golang/Language.java
Outdated
Show resolved
Hide resolved
jplag.frontend.golang/src/main/java/de/jplag/golang/Language.java
Outdated
Show resolved
Hide resolved
jplag.frontend.golang/src/main/java/de/jplag/golang/Language.java
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
<dependency> | ||
<groupId>de.jplag</groupId> | ||
<artifactId>frontend-utils</artifactId> |
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.
Add dependency to golang here
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.
But that's something we can also do later
This PR introduces a Golang frontend to JPlag. Its structure is very similar to the C# and R frontends.
It comes with a README, some basic tests, and some test code in written in Go.
Also, the README of the top module is updated to reflect the new CLI language options.
Its grammar definition should comply to go1.17, the current version being go1.18.
Addressing #345.