diff --git a/doc/configuration.md b/doc/configuration.md index 4c25b8e..5e9aea3 100644 --- a/doc/configuration.md +++ b/doc/configuration.md @@ -301,7 +301,7 @@ if 1 == 1 { } ``` -### [enforce-err-cuddling](rules.md#if-statements-that-check-an-error-must-be-cuddled-with-the-statement-that-assigned-the-error) +### [force-err-cuddling](rules.md#if-statements-that-check-an-error-must-be-cuddled-with-the-statement-that-assigned-the-error) Enforces that an `if` statement checking an error variable is cuddled with the line that assigned that error variable. @@ -362,4 +362,4 @@ if err != nil { ``` **Note**: this means the option _overrides_ the -[enforce-err-cuddling](#enforce-err-cuddling) option above, among others. +[force-err-cuddling](#force-err-cuddling) option above, among others. diff --git a/doc/rules.md b/doc/rules.md index 865bcf3..059bb7a 100644 --- a/doc/rules.md +++ b/doc/rules.md @@ -1016,7 +1016,7 @@ switch inSwitch.(type) { ### If statements that check an error must be cuddled with the statement that assigned the error > Can be configured, see [configuration -documentation](configuration.md#enforce-err-cuddling) +documentation](configuration.md#force-err-cuddling) When an `if` statement checks a variable named `err`, which was assigned on the line above, it should be cuddled with that assignment. This makes clear the relationship between the error check and the call that may have resulted in an error.