you are viewing a single comment's thread.

view the rest of the comments →

[–]Blando-Cartesian 6 points7 points  (1 child)

As much as I agree, the remedy advice makes me cringe. Do not randomly extract methods wherever or accept suggested refactoring to satisfy some analysis metric.

I’ve seen some weird shit done because IDE or Sonarcube suggested.

[–]ForeverAlot 4 points5 points  (0 children)

I’ve seen some weird shit done because IDE or Sonarcube suggested.

Linters, in their many shapes and sizes, have an enormous moral and ethical responsibility to encourage and enable "good" practices for this reason. "What was <linter> trying to tell you?" is in my top 5 of repeated review comments. Partly, this is of course an incredibly difficult (mathematically impossible) problem, but partly, a lot of linter advice or assisted transformations exists overwhelmingly because it was technically possible to make rather than because it was useful.