diff --git a/README.md b/README.md index be8badd..c0a9cb3 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # noinlineerr -A go linter that forbids inline error handling using `if err := ...; err != nil`. +A Go linter that forbids inline error handling using `if err := ...; err != nil`. --- ## Why? -Inline error handling in Go can hurt readibility by hiding the actual function call behind error plubming. -We believe errors and function deserve their own spotlight. +Inline error handling in Go can hurt readability by hiding the actual function call behind error plumbing. +We believe errors and functions deserve their own spotlight. Instead of: ```go @@ -14,7 +14,7 @@ if err := doSomething(); err != nil { return err } ``` -Prefer more explicit and readable: +Prefer the more explicit and readable: ```go err := doSomething() if err != nil { @@ -37,7 +37,7 @@ go install github.com/AlwxSin/noinlineerr/cmd/noinlineerr@latest noinlineerr ./... ``` -⚠️ Note: the linter detects inline error assignments only when the error variable is explicitly typed or deducible. It doesn't handle dynamically typed interfaces (e.g. foo().Err() where Err() returns error via interface). +⚠️ Note: The linter detects inline error assignments only when the error variable is explicitly typed or deducible. It doesn't handle dynamically typed interfaces (e.g., `foo().Err()` where `Err()` returns an error via an interface). --- @@ -51,4 +51,4 @@ Test data lives under `testdata/src/...` --- ## Contributing -PRs welcome. Let's make Go code cleaner, one `err` at a time. +PRs are welcome. Let's make Go code cleaner, one `err` at a time.