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
-
It's like a measure of how readable ur code is. The code I modified was completely readable!!! Heck I read it right??
-
@TheUchihaGirl hi!
I am sorry for your company, having these restrictions is silly in my honest opinion. Okay, yeah, sure, readable code, sure.
but literally restricting methods complexity and shit is fucking annoying. I have buddy at corporation and they have shit like that. They were working few days on one method... Becouse writing it was simple, and it worked, but they had to split it into gazillion of other methods becouse complexity metrics were too high, and every single fucking time something will blow up during the reductions. To the point where they gave up, compiled it and used it as external library so noone at company could say anything about it but oh boi that was one of most useless .dll's Ive seen.
Yeah, artificial "clean code" limit is such a bullshit... now i feel like writing rant about it. -
C0D4669016yWelcome to devRant. Get that avatar 👍
I haven't had the pleasure of being enforced to write clean code by another system, but damn... if it's readable and makes sense what's the problem 😅 -
LLAMS36646yI will never allow a program to judge whether or not my code is readable. There are already humans on my team who have questionable opinions of what is readable.
-
Code is read more often than written.
Nevertheless sonar seems a little daft and passive.
Okay so I have been a consumer of devRant for a while now but never posted anything. This is my first.
So yesterday I modified an existing method(some very minor changes!!). Today after coming to the office I see that I have comments from Sonarqube stating
"Reduce cognitive complexity from ** to 15.
I get that it is a good measure to maintain readability but this refactoring is not part of my change at all and any mishap can break the whole code base!!!.
My code even won't build because of this company restriction that there should not be any issues from Sonarqube.
I really want to bash my head against the wall right now.
rant
cognitive complexity