Skip to content

NormalizeSectionHeaderName

Normalize section header names.

Disabling the formatter

NormalizeSectionHeaderName is included in the default formatters, but it can be also run separately with:

robocop format --select NormalizeSectionHeaderName

You can also disable it:

robocop format --configure NormalizeSectionHeaderName.enabled=False

Robot Framework is quite flexible with the section header naming. The following lines are equal:

*setting
*** SETTINGS
*** SettingS ***

This formatter normalize naming to follow *** SectionName *** format (with the plural variant):

*** Settings ***
*** Keywords ***
*** Test Cases ***
*** Variables ***
*** Comments ***

Optional data after section header (for example data driven column names) is preserved. It is possible to upper case section header names by passing uppercase=True parameter:

robocop format --configure NormalizeSectionHeaderName.uppercase=True
[tool.robocop.format]
configure = [
    "NormalizeSectionHeaderName.uppercase=True"
]

will result in:

* setting *
*** SETTINGS ***

Skip formatting

It is possible to use the following arguments to skip formatting of the code:

It is also possible to use disablers but skip option makes it easier to skip all instances of a given type of the code.