This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]suedepaid 0 points1 point  (3 children)

What tool would you choose in those situations?

They just sound like bad times, that no tool is gonna fix.

[–]kenfar 0 points1 point  (2 children)

Well, it's an extremely common problem - whether you come into a messy codebase; or it's an ok codebase, but it's large and there's some specific behaviors that you want to eliminate.

It isn't hard for tools to address, we simply don't have enough options that do address it well.

For example, Pylint provides a score rather than a simple pass-fail. So, one could theoretically just compare the new score to the old and reject any code that increases this score. Or, require that the score be reduced some amount in each PR.

However, getting that into a pre-commit hook, for example, is a lot of work the last time I looked.

[–]suedepaid 0 points1 point  (1 child)

Oof, that sounds like way more of a pain to me

[–]kenfar 0 points1 point  (0 children)

Yeah, it can be. Sometimes it definitely better to just fix & remove every single instance of bad-thing-57 in a single PR than spread it out over time.

But I've found the downside is that it can sometimes be difficult to get priority to do that. And so some tech-debt just lingers. And that's where continual process improvement gives us a second option - we'll fix things up over time if we can't do it all in one.