Configuring Analyzers

Configuring Analyzers

Severity

The code analysis of natlint (and therefore natqube and natls) can be configured through an .editorconfig (editorconfig.org) file.

This makes it possible to configure the severity of diagnostics and pass analyzer specific settings.

Example:

[*]
natls.NL002.severity = none

The severity can be one of:

  • none: Disables the diagnostic
  • info
  • warn
  • error

Analyzer configuration

The following configurations can be set in an .editorconfig file to configure preferences for analyzers. Note, that all configurations are set to false by default, so you have to turn them on individually according to the below table.

PropertyPossible valuesDescription
natls.style.comparisonssign, short, falseNL006
natls.style.disallowtoplevelvarstrue, falseNL018
natls.style.qualifyvarstrue, falseNL019
natls.style.discourage_independenttrue, falseNL028
natls.style.discourage_gitmarkerstrue, falseNL030
natls.style.discourage_inlineparameterstrue, falseNL031
natls.style.discourage_hiddentransactionstrue, falseNL032
natls.style.discourage_hiddenworkfilestrue, falseNL033
natls.style.mark_mainframelonglinetrue, falseNL034
natls.style.discourage_hidden_dbmstrue, falseNL035
natls.style.discourage_long_literalstrue, falseNL038
natls.style.discourage_lowercase_codetrue, falseNL039
natls.style.in_out_groupstrue, falseNL041

Example

This .editorconfig file configures all comparisons tu use the sign style, except for copy codes, which should use the short style.

[*]
natls.style.comparisons=sign
[**/*.NSC]
natls.style.comparisons=short