Skip to content

Commas without a parameter at the end of a method call (ExtraCommas)

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

Description

Do not include a comma at the end of a method call without specifying a parameter. It is difficult to understand and does not carry important information.
Not required parameters under the principle of Occam's Razor "Do not multiply entities without need", since the "hanging" comma is not very informative.

Bad:

Result = Action (P1, P2 ,,);

Good:

Result = Action (P1, P2);

Sources

Snippets

Diagnostic ignorance in code

// BSLLS:ExtraCommas-off
// BSLLS:ExtraCommas-on

Parameter for config

"ExtraCommas": false