Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.22 KB

EmptyCodeBlock.md

File metadata and controls

39 lines (27 loc) · 1.22 KB

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
}