Inspectopedia 2024.3 Help

Declaration redundancy

Bool condition   New in this release

Reports parts of boolean expressions that are either always true, always false, or redundant.

Empty declaration   New in this release

Reports empty declarations.

Empty slice declared using a literal   New in this release

Reports slice declarations with empty literal initializers used instead of nil.

Redundant blank argument in range   New in this release

Reports optional blank variables in range loops.

Redundant comma   New in this release

Reports commas that may be omitted in the end of argument lists and composite literals.

Redundant import alias   New in this release

Reports aliases of imported packages that may be omitted.

Redundant second index in slices   New in this release

Reports a redundant second index (a high bound) in slice expressions.

Redundant semicolon   New in this release

Reports redundant semicolons.

Redundant type conversion  

Reports type conversions that may be omitted.

Redundant types in composite literals   New in this release

Reports redundant type declarations in composite literals.

Self assignment   New in this release

Reports expressions that are assigned to themselves.

Type can be omitted   New in this release

Reports types in variable and constant declarations that can be omitted since they can be inferred by the compiler.

Unused constant   New in this release

Reports constants that are defined but are never used in code.

Unused exported function   New in this release

Reports unused exported functions.

Unused exported type   New in this release

Reports unused exported types in the main package and in tests.

Unused function   New in this release

Reports unused unexported functions.

Unused global variable   New in this release

Reports global variables that are defined but are never used in code.

Unused parameter  

Reports unused function parameters.

Unused type   New in this release

Reports unused types.

Unused type parameter   New in this release

Reports unused type parameters.

Last modified: 03 December 2024