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

Generate Java assign token more often #830

Merged
merged 4 commits into from
Jan 13, 2023
Merged

Conversation

brodmo
Copy link
Contributor

@brodmo brodmo commented Dec 4, 2022

In Java, i++ is syntactic sugar for i += 1, which in turn is syntactic sugar for i = i + 1. Currently, a J_ASSIGN token is only generated in the last case, no tokens are generated in the other two cases. This inconsistency can be resolved by also generating a J_ASSIGN token for compound assignments and increment/decrement operations.

@brodmo brodmo force-pushed the java-assign branch 4 times, most recently from 37e4846 to cc3a3b4 Compare December 4, 2022 17:41
@tsaglam tsaglam added enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change language PR / Issue deals (partly) with new and/or existing languages for JPlag labels Dec 5, 2022
@tsaglam
Copy link
Member

tsaglam commented Dec 5, 2022

You need to adapt some expected values of test cases for this PR to pass the build. However, do not adapt the E2E tests yet.
For the spotless check, use mvn spotless:apply in order to apply formatting.

@sonarcloud
Copy link

sonarcloud bot commented Dec 13, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

94.4% 94.4% Coverage
0.0% 0.0% Duplication

Copy link
Member

@tsaglam tsaglam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to do some further tests in order to determine the impact of these changes on real datasets. Marked as changes requested to avoid accidental merging.

Copy link
Member

@tsaglam tsaglam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I tested it thoroughly with real-wold data.

@tsaglam tsaglam merged commit 076c9b4 into jplag:develop Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR that involves features, improvements and other changes language PR / Issue deals (partly) with new and/or existing languages for JPlag minor Minor issue/feature/contribution/change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants