Skip to content

Commit e4cc35e

Browse files
authored
Clarify suffix usage for Async methods (#393)
Follow-up for #374, to align with the replacement of "version" with "variant".
1 parent 5a10d39 commit e4cc35e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

_rules/1755.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
rule_id: 1755
33
rule_category: naming-conventions
4-
title: Only use `Async` or `TaskAsync` as a suffix when a method has both synchronous and asynchronous versions
4+
title: Only suffix methods with `Async` or `TaskAsync` when both synchronous and asynchronous variants exist
55
severity: 2
66
---
77
Only suffix a method or local function that returns `Task` or `Task<TResult>` with `Async` if there is also a synchronous variant of that method. If no synchronous variant exists, the `Async` suffix adds unnecessary noise. If both synchronous and asynchronous variants exist, use `Async` as the suffix. If a method suffixed with `Async` already exists, use `TaskAsync` instead.

0 commit comments

Comments
 (0)