Both of these (if vs guard clause, loop vs each) are enforced by the Rubocop linter in Ruby.
Both of these (if vs guard clause, loop vs each) are enforced by the Rubocop linter in Ruby.
It's good and nice that there is one linter for a particular language that catches 100 % of these issues in an example, but that doesn't do much to change the fact that most linters for most languages are unable to do this, and that there are quite some instances of these decisions where it is doubtful that any linter would be able to lint it.
In the long run improving the linter is better for everyone. The examples given by the OP as infeasible are feasible.
Focus on the design over trivial style issues. Your style guide should be 95% covered by the linter. If it isn't, fix your linter.
> Broadly missing a point
My points is: Underestimating static analysis will lead you to the wrong conclusions.
Such issues are rarely style issues. They are more in the design territory where the focus of code reviews should be.