Inspectopedia Help

Code style issues

Comment has no leading space  

Reports comments without a leading space.

Comment of exported element starts with the incorrect name  

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

Convert string literals  

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  

Reports format issues in error strings.

Exported element should have a comment  

Reports exported declarations without a documentation comment.

Exported element should have its own declaration  

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

Name starts with a package name  

Reports exported names that start with a package name.

Receiver has a generic name  

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

Redundant 'true' in for loop condition  

Reports the redundant true literal in the for loop condition.

Struct initialization without field names  

Reports structures that are initialized without specifying their field names.

Type parameter is declared in lowercase  

Reports type parameters that are declared in lowercase.

Unit-specific suffix for 'time.Duration'  

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

Unsorted imports  

Reports unsorted imports.

Usage of Snake_Case  

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

Last modified: 18 June 2024