I’m having a hard time envisioning a situation where testing my code requires a bunch of unused variables. Just don’t declare the variables until you’ve started writing the code that uses them…
I’m having a hard time envisioning a situation where testing my code requires a bunch of unused variables. Just don’t declare the variables until you’ve started writing the code that uses them…
Why in the world would you want to develop something that doesn’t follow the coding rules required by your org, just so you can go back and fix everything before submitting a PR? That’s just extra work.
It usually isn’t much good at writing new code from scratch. You have to be so specific on what you want that by the time you fully described the code you need, you could have written it yourself.
What it’s really good at is refactoring or finding bugs in existing code. I will frequently paste in some ugly function that I’ve written and say “can you make this more readable?” and 100% of the time it produces clean, readable code that’s nicer than what I gave it.
That was true 20 years ago. Things evolve. No one wants to download and install ten million individual apps for every single thing they do on the internet.
If that’s the problem, then I would just use something like goimports to auto fix the imports every time I hit save. I never even see those errors so they don’t bother me.