Inspectopedia 2024.3 Help

Code style issues

Comment has no leading space   New in this release

Reports comments without a leading space.

Comment of exported element starts with the incorrect name   New in this release

Reports comments that do not start with the name of the exported element.

Convert string literals   New in this release

Reports double-quoted string literals that can be converted into raw string literals and raw string literals that can be converted to double-quoted string literals.

Error string should not be capitalized or end with punctuation   New in this release

Reports format issues in error strings.

Exported element should have a comment   New in this release

Reports exported declarations without a documentation comment.

Exported element should have its own declaration   New in this release

Reports exported variables or constants in comma-separated lists of declarations.

Name starts with a package name   New in this release

Reports exported names that start with a package name.

Receiver has a generic name   New in this release

Reports receiver names like me, this, self, or names that differ from other receiver names for this type.

Redundant 'true' in for loop condition   New in this release

Reports the redundant true literal in the for loop condition.

Struct initialization without field names   New in this release

Reports structures that are initialized without specifying their field names.

Type parameter is declared in lowercase   New in this release

Reports type parameters that are declared in lowercase.

Unit-specific suffix for 'time.Duration'   New in this release

Reports unit-specific suffixes in constant and variable names of time.Duration type.

Unsorted imports   New in this release

Reports unsorted imports.

Usage of Snake_Case   New in this release

Reports usage of snake case instead of camelcase for naming variables, constants and functions.

Last modified: 03 December 2024