Skip to content

Empty code block (EmptyCodeBlock)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Code smell BSL
OS
Major Yes 5 badpractice
suspicious

Parameters

Name Type Description Default value
commentAsCode Boolean Comment as code false

Description

Empty blocks are a sign of a possible error:

  • Forgot to implement
  • Deleted content

Empty blocks of code must be filled or removed.

Snippets

Diagnostic ignorance in code

// BSLLS:EmptyCodeBlock-off
// BSLLS:EmptyCodeBlock-on

Parameter for config

"EmptyCodeBlock": {
    "commentAsCode": false
}