cookpad / global-style-guides

Official style guides for Cookpad Global
67 stars 16 forks source link

Enable Style/GuardClause #207

Closed Knack closed 9 months ago

Knack commented 9 months ago

We want to enable Style/GuardClause to make code easier to read and maintain. Guard clauses handle edge cases upfront, reducing nesting and making the "happy path" more transparent. This simplifies the code and makes it more approachable for new contributors. It also decreases the cognitive load for developers.

... and because we all :heart: guard clauses, don't we? 😄