Created
September 20, 2023 15:53
-
-
Save GLMeece/c5e1bf6c8bf391a61afa3574c1496e03 to your computer and use it in GitHub Desktop.
Robocop Rules List
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rule - 0201 [W]: missing-doc-keyword: Missing documentation in '{{ name }}' keyword | |
Rule - 0202 [W]: missing-doc-test-case: Missing documentation in '{{ name }}' test case | |
Rule - 0203 [W]: missing-doc-suite: Missing documentation in suite | |
Rule - 0204 [W]: missing-doc-resource-file: Missing documentation in resource file | |
Rule - 0301 [W]: not-allowed-char-in-name: Not allowed character '{{ character }}' found in {{ block_name }} name | |
Rule - 0302 [W]: wrong-case-in-keyword-name: Keyword name '{{ keyword_name }}' does not follow case convention | |
Rule - 0303 [E]: keyword-name-is-reserved-word: '{{ keyword_name }}' is a reserved keyword{{ error_msg }} | |
Rule - 0305 [W]: underscore-in-keyword-name: Underscores in keyword name '{{ keyword_name }}' can be replaced with spaces | |
Rule - 0306 [W]: setting-name-not-in-title-case: Setting name '{{ setting_name }}' should use title or upper case | |
Rule - 0307 [W]: section-name-invalid: Section name should be in format '{{ section_title_case }}' or '{{ section_upper_case }}' | |
Rule - 0308 [W]: not-capitalized-test-case-title: Test case '{{ test_name }}' title should start with capital letter | |
Rule - 0309 [W]: section-variable-not-uppercase: Section variable '{{ variable_name }}' name should be uppercase | |
Rule - 0310 [W]: non-local-variables-should-be-uppercase: Test, suite and global variables should be uppercase | |
Rule - 0311 [E]: else-not-upper-case: ELSE and ELSE IF should be upper case | |
Rule - 0312 [E]: keyword-name-is-empty: Keyword name should not be empty | |
Rule - 0313 [E]: test-case-name-is-empty: Test case name should not be empty | |
Rule - 0314 [E]: empty-library-alias: Library alias should not be empty | |
Rule - 0315 [W]: duplicated-library-alias: Library alias should not be the same as original name | |
Rule - 0316 [I]: possible-variable-overwriting: Variable '{{ variable_name }}' may overwrite similar variable inside '{{ block_name }}' {{ block_type }}. Note that variables are case-insensitive, and also spaces and underscores are ignored. | |
Rule - 0317 [I]: hyphen-in-variable-name: Use underscore in variable name '{{ variable_name }}' instead of hyphens to avoid treating them like minus sign | |
Rule - 0318 [W]: bdd-without-keyword-call: BDD reserved keyword '{{ keyword_name }}' not followed by any keyword{{ error_msg }} | |
Rule - 0319 [W]: deprecated-statement: '{{ statement_name }}' is deprecated since Robot Framework version {{ version }}, use '{{ alternative }}' instead | |
Rule - 0320 [W]: not-allowed-char-in-filename: Not allowed character '{{ character }}' found in {{ block_name }} name | |
Rule - 0321 [W]: deprecated-with-name: 'WITH NAME' alias marker is deprecated since Robot Framework 6.0 version and will be removed in the future release. Use 'AS' instead | |
Rule - 0322 [W]: deprecated-singular-header: '{{ singular_header }}' singular header form is deprecated since RF 6.0 and will be removed in the future releases. Use '{{ plural_header }}' instead | |
Rule - 0323 [W]: inconsistent-variable-name: Variable '{{ name }}' has inconsistent naming. First used as '{{ first_use }}' | |
Rule - 0324 [W]: overwriting-reserved-variable: {{ var_or_arg }} '{{ variable_name }}' overwrites reserved variable '{{ reserved_variable }}' | |
Rule - 0325 [E]: invalid-section: Invalid section '{{ invalid_section }}'. Consider using --language parameter if the file is defined with different language (disabled - supported only for RF version >=6.1) | |
Rule - 0326 [W]: mixed-task-test-settings: Use {{ task_or_test }}-related setting '{{ setting }}' if {{ tasks_or_tests }} section is used | |
Rule - 0401 [E]: parsing-error: Robot Framework syntax error: {{ error_msg }} | |
Rule - 0402 [E]: not-enough-whitespace-after-setting: Provide at least two spaces after '{{ setting_name }}' setting | |
Rule - 0403 [E]: missing-keyword-name: Missing keyword name when calling some values | |
Rule - 0404 [E]: variables-import-with-args: YAML variable files do not take arguments | |
Rule - 0405 [E]: invalid-continuation-mark: Invalid continuation mark '{{ mark }}'. It should be '...' | |
Rule - 0406 [E]: not-enough-whitespace-after-newline-marker: Provide at least two spaces after '...' marker | |
Rule - 0407 [E]: invalid-argument: {{ error_msg }} | |
Rule - 0408 [E]: non-existing-setting: {{ error_msg }} | |
Rule - 0409 [E]: setting-not-supported: Setting '[{{ setting_name }}]' is not supported in {{ test_or_keyword }}. Allowed are: {{ allowed_settings }} | |
Rule - 0410 [E]: not-enough-whitespace-after-variable: Provide at least two spaces after '{{ variable_name }}' variable name | |
Rule - 0411 [E]: not-enough-whitespace-after-suite-setting: Provide at least two spaces after '{{ setting_name }}' setting | |
Rule - 0412 [E]: invalid-for-loop: Invalid for loop syntax: {{ error_msg }} | |
Rule - 0413 [E]: invalid-if: Invalid IF syntax: {{ error_msg }} | |
Rule - 0414 [E]: return-in-test-case: RETURN can only be used inside a user keyword | |
Rule - 0415 [E]: invalid-section-in-resource: Resource file can't contain '{{ section_name }}' section | |
Rule - 0416 [E]: invalid-setting-in-resource: Settings section in resource file can't contain '{{ section_name }}' setting | |
Rule - 0417 [E]: unsupported-setting-in-init-file: Setting '{{ setting }}' is not supported in initialization files | |
Rule - 0501 [W]: too-long-keyword: Keyword '{{ keyword_name }}' is too long ({{ keyword_length }}/{{ allowed_length}}) | |
Rule - 0502 [W]: too-few-calls-in-keyword: Keyword '{{ keyword_name }}' has too few keywords inside ({{ keyword_count }}/{{ min_allowed_count }}) | |
Rule - 0503 [W]: too-many-calls-in-keyword: Keyword '{{ keyword_name }}' has too many keywords inside ({{ keyword_count }}/{{ max_allowed_count }}) | |
Rule - 0504 [W]: too-long-test-case: Test case '{{ test_name }}' is too long ({{ test_length }}/{{ allowed_length }}) | |
Rule - 0505 [W]: too-many-calls-in-test-case: Test case '{{ test_name }}' has too many keywords inside ({{ keyword_count }}/{{ max_allowed_count }}) | |
Rule - 0506 [W]: file-too-long: File has too many lines ({{ lines_count }}/{{max_allowed_count }}) | |
Rule - 0507 [W]: too-many-arguments: Keyword '{{ keyword_name }}' has too many arguments ({{ arguments_count }}/{{ max_allowed_count }}) | |
Rule - 0508 [W]: line-too-long: Line is too long ({{ line_length }}/{{ allowed_length }}) | |
Rule - 0509 [W]: empty-section: Section '{{ section_name }}' is empty | |
Rule - 0510 [W]: number-of-returned-values: Too many return values ({{ return_count }}/{{ max_allowed_count }}) | |
Rule - 0511 [W]: empty-metadata: Metadata settings does not have any value set | |
Rule - 0512 [W]: empty-documentation: Documentation of {{ block_name }} is empty | |
Rule - 0513 [W]: empty-force-tags: Force Tags are empty | |
Rule - 0514 [W]: empty-default-tags: Default Tags are empty | |
Rule - 0515 [E]: empty-variables-import: Import variables path is empty | |
Rule - 0516 [E]: empty-resource-import: Import resource path is empty | |
Rule - 0517 [E]: empty-library-import: Import library path is empty | |
Rule - 0518 [E]: empty-setup: Setup of {{ block_name }} does not have any keywords | |
Rule - 0519 [E]: empty-suite-setup: Suite Setup does not have any keywords | |
Rule - 0520 [E]: empty-test-setup: Test Setup does not have any keywords | |
Rule - 0521 [E]: empty-teardown: Teardown of {{ block_name }} does not have any keywords | |
Rule - 0522 [E]: empty-suite-teardown: Suite Teardown does not have any keywords | |
Rule - 0523 [E]: empty-test-teardown: Test Teardown does not have any keywords | |
Rule - 0524 [W]: empty-timeout: Timeout of {{ block_name }} is empty | |
Rule - 0525 [W]: empty-test-timeout: Test Timeout is empty | |
Rule - 0526 [E]: empty-arguments: Arguments of {{ block_name }} are empty | |
Rule - 0527 [W]: too-many-test-cases: Too many test cases ({{ test_count }}/{{ max_allowed_count }}) | |
Rule - 0528 [E]: too-few-calls-in-test-case: Test case '{{ test_name }}' has too few keywords inside ({{ keyword_count }}/{{ min_allowed_count }}) | |
Rule - 0529 [E]: empty-test-template: Test Template is empty | |
Rule - 0530 [W]: empty-template: Template of {{ block_name }} is empty. To overwrite suite Test Template use more explicit [Template] NONE | |
Rule - 0531 [W]: empty-keyword-tags: Keyword Tags are empty | |
Rule - 0601 [W]: tag-with-space: Tag '{{ tag }}' should not contain spaces | |
Rule - 0602 [I]: tag-with-or-and: Tag '{{ tag }}' with reserved word OR/AND. Hint: make sure to include this tag using lowercase name to avoid issues | |
Rule - 0603 [W]: tag-with-reserved-word: Tag '{{ tag }}' prefixed with reserved word `robot:` | |
Rule - 0605 [I]: could-be-test-tags: All tests in suite share these tags: '{{ tags }}'. You can define them in 'Test Tags' in suite settings instead | |
Rule - 0606 [I]: tag-already-set-in-test-tags: Tag '{{ tag }}' is already set by {{ test_force_tags }} in suite settings | |
Rule - 0607 [I]: unnecessary-default-tags: Tags defined in Default Tags are always overwritten | |
Rule - 0608 [W]: empty-tags: [Tags] setting without values{{ optional_warning }} | |
Rule - 0609 [W]: duplicated-tags: Multiple tags with name '{{ name }}' (first occurrence at line {{ line }} column {{ column }}) | |
Rule - 0610 [I]: could-be-keyword-tags: All keywords in suite share these tags: '{{ tags }}'. You can define them in 'Keyword Tags' in suite settings instead | |
Rule - 0611 [I]: tag-already-set-in-keyword-tags: Tag '{{ tag }}' is already set by {{ keyword_tags }} in suite settings | |
Rule - 0701 [W]: todo-in-comment: Found a marker '{{ marker }}' in the comments | |
Rule - 0702 [W]: missing-space-after-comment: Missing blank space after comment character | |
Rule - 0703 [E]: invalid-comment: Invalid comment. '#' needs to be first character in the cell. For block comments you can use '*** Comments ***' section (disabled - supported only for RF version <4.0) | |
Rule - 0704 [W]: ignored-data: Ignored data found in file | |
Rule - 0705 [W]: bom-encoding-in-file: This file contains BOM (Byte Order Mark) encoding not supported by Robot Framework | |
Rule - 0801 [E]: duplicated-test-case: Multiple test cases with name '{{ name }}' (first occurrence in line {{ first_occurrence_line }}) | |
Rule - 0802 [E]: duplicated-keyword: Multiple keywords with name '{{ name }}' (first occurrence in line {{ first_occurrence_line }}) | |
Rule - 0803 [E]: duplicated-variable: Multiple variables with name '{{ name }}' in Variables section (first occurrence in line {{ first_occurrence_line }}). Note that Robot Framework is case-insensitive | |
Rule - 0804 [W]: duplicated-resource: Multiple resource imports with path '{{ name }}' (first occurrence in line {{ first_occurrence_line }}) | |
Rule - 0805 [W]: duplicated-library: Multiple library imports with name '{{ name }}' and identical arguments (first occurrence in line {{ first_occurrence_line }}) | |
Rule - 0806 [W]: duplicated-metadata: Duplicated metadata '{{ name }}' (first occurrence in line {{ first_occurrence_line }}) | |
Rule - 0807 [W]: duplicated-variables-import: Duplicated variables import with path '{{ name }}' (first occurrence in line {{ first_occurrence_line }}) | |
Rule - 0808 [W]: section-already-defined: '{{ section_name }}' section header already defined in file (first occurrence in line {{ first_occurrence_line }}) | |
Rule - 0809 [W]: section-out-of-order: '{{ section_name }}' section header is defined in wrong order: {{ recommended_order }} | |
Rule - 0810 [E]: both-tests-and-tasks: Both Task(s) and Test Case(s) section headers defined in file | |
Rule - 0811 [E]: duplicated-argument-name: Argument name '{{ argument_name }}' is already used | |
Rule - 0812 [I]: duplicated-assigned-var-name: Assigned variable name '{{ variable_name }}' is already used | |
Rule - 0813 [W]: duplicated-setting: {{ error_msg }} | |
Rule - 0901 [W]: keyword-after-return: {{ error_msg }} | |
Rule - 0903 [W]: empty-return: [Return] is empty | |
Rule - 0907 [E]: nested-for-loop: Nested for loops are not supported. You can use keyword with for loop instead (disabled - supported only for RF version <4.0) | |
Rule - 0908 [I]: if-can-be-used: '{{ run_keyword }}' can be replaced with IF block since Robot Framework 4.0 (disabled - supported only for RF version ==4.*) | |
Rule - 0909 [W]: inconsistent-assignment: The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead | |
Rule - 0910 [W]: inconsistent-assignment-in-variables: The assignment sign is not consistent inside the variables section. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead | |
Rule - 0911 [W]: wrong-import-order: BuiltIn library import '{{ builtin_import }}' should be placed before '{{ custom_import }}' | |
Rule - 0912 [I]: empty-variable: Use built-in variable {{ var_type }}{EMPTY} instead of leaving variable without value or using backslash | |
Rule - 0913 [I]: can-be-resource-file: No tests in '{{ file_name }}' file, consider renaming to '{{ file_name_stem }}.resource' | |
Rule - 0914 [I]: if-can-be-merged: IF statement can be merged with previous IF (defined in line {{ line }}) | |
Rule - 0915 [E]: statement-outside-loop: {{ name }} {{ statement_type }} used outside a loop | |
Rule - 0916 [I]: inline-if-can-be-used: IF can be replaced with inline IF | |
Rule - 0917 [W]: unreachable-code: Unreachable code after {{ statement }} statement | |
Rule - 0918 [W]: multiline-inline-if: Avoid splitting inline IF to multiple lines | |
Rule - 0919 [W]: unused-argument: Keyword argument '{{ name }}' is not used | |
Rule - 0920 [I]: unused-variable: Variable '{{ name }}' is assigned but not used | |
Rule - 0921 [W]: argument-overwritten-before-usage: Keyword argument '{{ name }}' is overwritten before usage | |
Rule - 0922 [W]: variable-overwritten-before-usage: Local variable '{{ name }}' is overwritten before usage | |
Rule - 0923 [I]: unnecessary-string-conversion: Variable '{{ name }}' in '{{ block_name }}' condition has unnecessary string conversion | |
Rule - 0924 [I]: expression-can-be-simplified: '{{ block_name }}' condition can be simplified | |
Rule - 0925 [I]: misplaced-negative-condition: '{{ block_name }}' condition '{{ original_condition }}' can be rewritten to '{{ proposed_condition }}' | |
Rule - 1001 [W]: trailing-whitespace: Trailing whitespace at the end of line | |
Rule - 1002 [W]: missing-trailing-blank-line: Missing trailing blank line at the end of file | |
Rule - 1003 [W]: empty-lines-between-sections: Invalid number of empty lines between sections ({{ empty_lines }}/{{ allowed_empty_lines }}) | |
Rule - 1004 [W]: empty-lines-between-test-cases: Invalid number of empty lines between test cases ({{ empty_lines }}/{{ allowed_empty_lines }}) | |
Rule - 1005 [W]: empty-lines-between-keywords: Invalid number of empty lines between keywords ({{ empty_lines }}/{{ allowed_empty_lines }}) | |
Rule - 1006 [W]: mixed-tabs-and-spaces: Inconsistent use of tabs and spaces in file | |
Rule - 1008 [W]: bad-indent: {{ bad_indent_msg }} | |
Rule - 1009 [W]: empty-line-after-section: Too many empty lines after '{{ section_name }}' section header ({{ empty_lines }}/{{ allowed_empty_lines }}) | |
Rule - 1010 [W]: too-many-trailing-blank-lines: Too many blank lines at the end of file | |
Rule - 1011 [W]: misaligned-continuation: Continuation marker should be aligned with starting row | |
Rule - 1012 [W]: consecutive-empty-lines: Too many consecutive empty lines ({{ empty_lines }}/{{ allowed_empty_lines }}) | |
Rule - 1013 [W]: empty-lines-in-statement: Multi-line statement with empty lines | |
Rule - 1014 [E]: variable-should-be-left-aligned: Variable in Variable section should be left aligned | |
Rule - 1015 [W]: misaligned-continuation-row: Each next continuation line should be aligned with the previous one | |
Rule - 1016 [E]: suite-setting-should-be-left-aligned: Setting in Settings section should be left aligned | |
Rule - 1017 [E]: bad-block-indent: Indent expected. Provide 2 or more spaces of indentation for statements inside block | |
Altogether 142 rules with following severity: | |
46 error rules, | |
78 warning rules, | |
18 info rules. | |
Visit https://robocop.readthedocs.io/en/stable/rules.html page for detailed documentation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For detail on any of the above, go to the official rules list.