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

EC63 - issue message still doesn’t make sense #166

Closed
jycr opened this issue Apr 11, 2023 · 2 comments · Fixed by #172
Closed

EC63 - issue message still doesn’t make sense #166

jycr opened this issue Apr 11, 2023 · 2 comments · Fixed by #172
Assignees
Labels
🔰 good first issue Good for newcomers 🗃️ rule rule improvment or rule development or bug java __PRIO_HIGH__ 💉 bug Something isn't working

Comments

@jycr
Copy link
Contributor

jycr commented Apr 11, 2023

When analyze https://github.com/green-code-initiative/ecoCode-java-test-project.git, following is raised:

The variable is not assigned

for following code:

        final int len = 5;

image

Explicitly, the variable is assigned.

@dedece35 dedece35 added 💉 bug Something isn't working 🔰 good first issue Good for newcomers 🗃️ rule rule improvment or rule development or bug java __PRIO_HIGH__ labels Apr 11, 2023
@jycr
Copy link
Contributor Author

jycr commented Apr 12, 2023

According to the corresponding test case (java-plugin/src/test/files/UnnecessarilyAssignValuesToVariablesTestCheck.java), shouldn't the message instead be:

The variable is never read

Or

The variable is never used

?

@dedece35 dedece35 self-assigned this Apr 12, 2023
@dedece35 dedece35 linked a pull request Apr 12, 2023 that will close this issue
@dedece35
Copy link
Member

dedece35 commented Apr 12, 2023

Hi @jycr
PRs done :

indeed, only a message problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔰 good first issue Good for newcomers 🗃️ rule rule improvment or rule development or bug java __PRIO_HIGH__ 💉 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants