# Disabling and enabling inspections

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/2026.3/llms.txt).

Some inspections may report problems that you currently do not want to see. In this case, you can disable or suppress them.

## Disable inspections

When you disable an inspection, you turn it off. It means that the code analysis engine stops searching project files for the problem that this inspection is designed to detect. Note that when you disable an inspection, you disable it in the current inspection profile; it remains enabled in other profiles.

Most inspections in GoLand can be disabled. However, some inspections will keep highlighting your code regardless of the settings. For example, syntax errors are always highlighted.

Procedure: Disable an inspection in settings

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) to open settings and then select `Editor | Inspections`.

2. Locate the inspection you want to disable and clear the checkbox next to it.

3. Apply the changes and close the dialog.

You can quickly disable a triggered inspection directly in the editor using a context action.

Procedure: Disable an inspection from the editor

1. Place the caret at the highlighted line and press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Ctrl+.` (VSCode), `⌘ .` (VSCode (macOS)) (or click ![the Show Context Actions icon](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.codeInsight.intentionBulb.svg)) to invoke a list of available context actions.

2. Click ![the More Actions button](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.moreVertical.svg) next to the inspection you want to disable and select Disable inspection.

Procedure: Disable an inspection from the Problems tool window

1. In the Inspection Results tab of the Problems tool window (appears once you run code analysis), right-click the inspection you want to disable and select Disable inspection.

2. Click ![the View Options button](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.show.svg) on the toolbar and select Filter resolved items to hide the disabled inspection alerts.

## Suppress inspections

When you suppress an inspection, the code analysis engine does not highlight the problem found by this inspection in a specific piece of code(type, function, or line). You can also suppress all inspections in the current type.

Most inspections in GoLand can be suppressed. However, some inspections do not have this option. For example, syntax errors are always highlighted in the editor regardless of the settings. To learn whether a specific inspection can be suppressed, see [Inspectopedia](https://www.jetbrains.com/help/inspectopedia/JavaScript-and-TypeScript.html).

Procedure: Suppress an inspection from the editor

1. Place the caret at the highlighted line and press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Ctrl+.` (VSCode), `⌘ .` (VSCode (macOS)) (or click ![the Intention action icon](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.codeInsight.intentionBulb.svg) to use the intention action).

2. Click the ![](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.moreVertical.svg) button next to the inspection you want to suppress and select an action according to the required scope.   GoLand adds a `//goland:noinspection` comment above the code fragment where the inspection is suppressed.

You can find a list of inspections and their identifiers in the [Suppressing
comments](#comments-ref) table. For example, to suppress the Comment of exported element starts with the incorrect name inspection, add `//goland:noinspection GoCommentStart` above the declaration.

Use the inspection ID without the `Inspection` suffix. To suppress several inspections, separate their IDs with commas. The older form, such as `// noinspection GoCommentStart`, is also supported.

![Suppressing an inspection](https://resources.jetbrains.com/help/img/idea/2026.3/go_suppress_inspection.png)

Procedure: Suppress an inspection from the Problems tool window

The Inspection Results tab of the Problems tool window shows the problems detected while running code analysis.

* In the Inspection Results tab of the Problems tool window (appears once you run code analysis), right-click the inspection you want to suppress and select the necessary suppress action.

![Suppressing inspection in the Inspection Results tool window](https://resources.jetbrains.com/help/img/idea/2026.3/go_suppress_tool_window.png)

Procedure: Enable suppressed inspections

When you suppress an inspection, the IDE adds a `//noinspection` annotation before the selected symbol. For example, if you suppress an inspection for a statement, GoLand adds the annotation before this statement.

* To re-enable a suppressed inspection, delete the `//noinspection` annotation.

![The //noinspection annotation before a method](https://resources.jetbrains.com/help/img/idea/2026.3/go_enable_suppressed_inspection.png)

## Disable highlighting, but keep the fix

Inspections have [severities](configuring-inspection-severities.html) according to which they highlight code problems in the editor. You can quickly disable code highlighting for an inspection without opening the settings. In this case, the inspection remains enabled and provides a fix, but the severity changes to No highlighting (fix available).

Procedure:

1. Place the caret at a code element highlighted by an inspection in the editor and press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Ctrl+.` (VSCode), `⌘ .` (VSCode (macOS)).

A list with available fixes and context actions opens. Locate the inspection fix that is marked with ![Intention action icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.codeInsight.intentionBulb.png).

2. Click the ![](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.general.moreVertical.svg) button next to the fix to open the inspection's options and select Disable highlighting, keep fix.

![Disable highlighting, keep the fix](https://resources.jetbrains.com/help/img/idea/2026.3/go_disable_highlight_keep_fix.png)

The name of the inspection for which you are changing the severity is written above the inspection's options.

If you want to restore the highlighting, press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) to open the IDE settings and select `Editor | Inspections`. Find the necessary inspection in the list and change its severity as you like. For more information, refer to [Change inspection severity in all scopes](configuring-inspection-severities.html#change-severity).

## Change the highlighting level for a file

Procedure:

* By default, GoLand highlights all detected code problems. Hover over the widget in the top-right corner of the editor and select another level from the Highlight list:

* None: turn highlighting off.

* Syntax: highlight syntax problems only.

* All Problems: (default) highlight syntax problems and problems found by inspections.

* You can also change the highlighting level  from the main menu. Select  or press `Ctrl+Alt+Shift+H` (Windows), `⌘ ⌥ ⇧ H` (macOS), `⌘ ⌥ ⇧ H` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ ⇧ H` (macOS System Shortcuts), `Ctrl+Alt+Shift+H` (XWin), `Ctrl+Alt+Shift+H` (GNOME), `Ctrl+Alt+Shift+H` (KDE), `Ctrl+Alt+Shift+H` (Emacs), `Ctrl+Alt+Shift+H` (Sublime Text), `⌘ ⌥ ⇧ H` (Sublime Text (macOS)), `Ctrl+Alt+Shift+H` (VSCode), `⌘ ⌥ ⇧ H` (VSCode (macOS))  .

## Suppressing comments

| Name of the inspection | ID to use with the noinspection keyword |
| --- | --- |
| Unused constant | GoUnusedConst |
| Unused global variable | GoUnusedGlobalVariable |
| Unused exported function | GoUnusedExportedFunction |
| Unused function | GoUnusedFunction |
| Unused parameter | GoUnusedParameter |
| Unused type parameter | GoUnusedTypeParameter |
| Unused type | GoUnusedType |
| Unused exported type | GoUnusedExportedType |
| Disabled GOPATH indexing | GoDisabledGopathIndexing |
| Bool condition | GoBoolExpressions |
| Self assignment | GoSelfAssignment |
| Empty declaration | GoEmptyDeclaration |
| Redundant second index in slices | GoRedundantSecondIndexInSlices |
| Redundant blank argument in range | GoRedundantBlankArgInRange |
| Redundant types in composite literals | GoRedundantTypeDeclInCompositeLit |
| Redundant semicolon | GoRedundantSemicolon |
| Redundant comma | GoRedundantComma |
| Redundant type conversion | GoRedundantConversion |
| Redundant import alias | GoRedundantImportAlias |
| Type can be omitted | GoVarAndConstTypeMayBeOmitted |
| Empty slice declared using a literal | GoPreferNilSlice |
| Comment of exported element starts with the incorrect name | GoCommentStart |
| Exported element should have its own declaration | GoExportedOwnDeclaration |
| Struct initialization without field names | GoStructInitializationWithoutFieldNames |
| Receiver has a generic name | GoReceiverNames |
| Name starts with a package name | GoNameStartsWithPackageName |
| Unsorted imports | GoUnsortedImport |
| Error string should not be capitalized or end with punctuation | GoErrorStringFormat |
| Comment has no leading space | GoCommentLeadingSpace |
| Usage of Snake_Case | GoSnakeCaseUsage |
| Exported element should have a comment | GoExportedElementShouldHaveComment |
| Unit-specific suffix for 'time.Duration' | GoUnitSpecificDurationSuffix |
| Type parameter is declared in lowercase | GoTypeParameterInLowerCase |
| Redundant 'true' in for loop condition | GoRedundantTrueInForCondition |
| Reserved word used as name | GoReservedWordUsedAsName |
| Loop variables captured by the func literal | GoLoopClosure |
| Imported package name as a name identifier | GoImportUsedAsName |
| Malformed struct tag | GoVetStructTag |
| Impossible interface type assertion | GoVetImpossibleInterfaceToInterfaceAssertion |
| Incorrect usage of 'fmt.Printf' and 'fmt.Println' functions | GoPrintFunctions |
| Shadowing variable | GoShadowedVar |
| Division by zero | GoDivisionByZero |
| Incorrect 'strings.Replace' count argument | GoStringsReplaceCount |
| Malformed build tag | GoBuildTag |
| Incorrect usage of the 'sync/atomic' package | GoVetAtomic |
| Locks mistakenly passed by value | GoVetCopyLock |
| Invalid conversions of 'uintptr' to 'unsafe.Pointer' | GoVetUnsafePointer |
| Incorrect usage of the 'errors.As' function | GoErrorsAs |
| Unused function or method call result | GoUnusedCallResult |
| Unhandled error | GoUnhandledErrorResult |
| Nilness analyzer | GoNilness |
| Defer/go statement calls 'recover' or 'panic' directly | GoDeferGo |
| Non-standard signature for well-known function names | GoStandardMethods |
| Exceeded shift expression | GoShift |
| 'Unmarshal' is called with the incorrect argument | GoVetUnmarshal |
| Integer to string type conversion | GoVetIntToStringConversion |
| 'context.CancelFunc' is not called | GoVetLostCancel |
| 'FailNow' in a non-test goroutine | GoVetFailNowInNotTestGoroutine |
| Mixed value and pointer receivers | GoMixedReceiverTypes |
| Irregular usage of 'iota' | GoIrregularIota |
| Direct comparison of errors | GoDirectComparisonOfErrors |
| Type assertion on errors fails on wrapped errors | GoTypeAssertionOnErrors |
| Missing 'case' statements for 'iota' consts in 'switch' | GoSwitchMissingCasesForIotaConsts |
| Infinite 'for' loop | GoInfiniteFor |
| 'defer' in the loop | GoDeferInLoop |
| Assignment to a receiver | GoAssignmentToReceiver |
| Unreachable code | GoUnreachableCode |
| Deprecated element | GoDeprecation |
| Redundant parentheses | GoRedundantParens |
| Unexported return type of the exported function | GoExportedFuncWithUnexportedType |
| Unnecessarily exported identifier | GoUnnecessarilyExportedIdentifiers |
| Malformed test function name | GoTestName |
| Usage of context.TODO() | GoContextTodo |
| Usage of 'interface{}' as a type | GoInterfaceToAny |
| Fuzzing is supported starting with Go 1.18 | GoFuzzingSupport |
| Convert string literals | GoConvertStringLiterals |
| Leading whitespace in directive comment | GoLeadingWhitespaceInDirectiveComment |
| Missing trailing comma before a newline in a composite literal | GoMissingTrailingComma |

## See also

### Concepts

[Code inspections](code-inspection.html)

### Procedures

[Run inspections](running-inspections.html) [Intention actions](intention-actions.html)

