Skip to content

Commit

Permalink
move principles before the rest
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-epure-sonarsource authored and zsolt-kolbay-sonarsource committed May 29, 2024
1 parent 4d686fc commit 57e0ac2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/coding-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@ public void MethodB()

## Naming conventions

### Casing

Protected fields should start with lowercase letter.

### Principles

Keep it minimal and suggestive.
- Generic words that don't convey meaning (e.g. `Helper`) should be avoided.
- Overwordy and complex names should be avoided as well.
- Use positive naming when possible.

### Casing

Protected fields should start with lowercase letter.

### Parameters and variables

Single variable lambdas should use `x` as the variable name (based on lambda calculus λx). Multi variable lambdas should use descriptive names, where `x` can be used for the main iterated item like `(x, index) => ...`. Name `c` can be used for context of Roslyn callback.
Expand Down

0 comments on commit 57e0ac2

Please sign in to comment.