Skip to content

Commit

Permalink
Add negative boolean expression note to CONTRIBUTING.md (#49033)
Browse files Browse the repository at this point in the history
The team sometimes get questions around the use of `!foo` vs. `foo == false` in
PRs and reviews (e.g.  #48615). This change adds a bullet point to CONTRIBUTING.md
to make expectations here clearer and gives us something to point to in case of
discussion.
  • Loading branch information
Christoph Büscher committed Nov 13, 2019
1 parent e86b598 commit dc50d3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ Please follow these formatting guidelines:
decrease in consistency.
* Note that JavaDoc and block comments i.e. `/* ... */` are not formatted,
but line comments i.e `// ...` are.
* There is an implicit rule that negative boolean expressions should use
the form `foo == false` instead of `!foo` for better readability of the
code. While this isn't strictly enforced, if might get called out in PR
reviews as something to change.

#### Editor / IDE Support

Expand Down

0 comments on commit dc50d3f

Please sign in to comment.