Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I hope are not going through the files manually. That would be a nightmare.😨😨😨😨.
If so, you can integrate your project with an appropriate code quality tool.
I know it can be a pain to rectify all the code smells at once but if you integrate your project with a tool, it will automatically generate the smells and other stuffs like coverage report, vulnerabilities etc. Then the dev who actually gave the pr will be responsible for correcting it before his code gets merged 😏😏. So less work for you. You won't have to rectify any new code smells. -
@TheUchihaGirl can you tell me more about what kind of code quality tools you know please?
-
Avyy7506yActually, those unused variables are used for debug purposes. If anything goes wrong, these variables can tell what is happening. It may be a good idea to see what they are used for, before mindlessly deleting them.
Also, get a linter do the task for you. -
Avyy7505y@matwx Hey, I'm just guessing. How would I know what they are used for?
Also, not everyone knows Junit , maybe the dev before you wrote it like this. I had to work with such a class. It had a DEBUG Boolean and all the functions were riddled with if else conditions for debug. The dev would manually toggle debug to true during testing and reset it to false in prod. -
matwx1095y@AvyChanna We had junit in place. Therefore is not acceptable in the project environment.
I'm task to amend the code smell in the project. I literally can cry a river.
I see such thing as i = i++; - It's flag out as a bug.
I have also seen check in classes. With un-used variables. I literally cried.
In the past, i ask why do i got to care about code quality. I actually start to get angry like the team leads in my project.
rant