Ask HN: Habits to avoid small mistakes in PRs
Typical I write it and try to pay attention to the style of the repo, than run the tests. But often, there are small gotchas at my work that I don’t notice.
Typical I write it and try to pay attention to the style of the repo, than run the tests. But often, there are small gotchas at my work that I don’t notice.
I get feedback that my PRs are very polished, and I think this habit has helped.
Sometimes I'll also do a PR review of my own PR before asking for someone else to review it.
My other personal rule is that if I feel the need to leave a comment explaining a decision, it's probably the wrong one.
Aside from being a super useful way to only stage some of your changes, it will also serve as a useful proofreading step.
This is something of a superpower for catching things before review and in my experience makes the actual third party review pointless 95% of the time.
Linters and other tools also help. They should run as a pre-commit hook.