Skip to content

feat: split missing-section-variable-type into keyword and test variable rules - #1982

Open
bhirsz wants to merge 1 commit into
mainfrom
feat/split-missing-variable-type-rules
Open

bhirsz wants to merge 1 commit into
mainfrom
feat/split-missing-variable-type-rules

Conversation

@bhirsz

@bhirsz bhirsz commented Nov 15, 2026

Copy link
Copy Markdown
Member

Closes #1979

Summary

Splits ANN01: missing-section-variable-type so type annotation requirements can be enforced separately per context:

  • ANN01 missing-section-variable-type - now only checks variables in the *** Variables *** section.
  • ANN05 missing-keyword-variable-type (new) - checks VAR statements and assignments (${var} = Keyword) inside keywords.
  • ANN06 missing-test-variable-type (new) - checks VAR statements and assignments inside tests and tasks.

New rules are disabled by default and require Robot Framework 7.3+, same as ANN01.

Behavior change

Users who enabled missing-section-variable-type to also cover keyword/test variables now need to additionally select missing-keyword-variable-type and/or missing-test-variable-type.

Tests

  • Acceptance tests for ANN05 and ANN06 (keywords, nested IF/FOR, tests, tasks, multi-assignment).
  • ANN01 expected output updated - keyword variables are no longer reported.
  • docs/rules_list.md regenerated.

…ble rules

Closes #1979

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bhirsz
bhirsz force-pushed the feat/split-missing-variable-type-rules branch from defa2a9 to 2dfd3ca Compare November 15, 2026 12:55
Comment thread docs/rules_list.md
Comment on lines +13354 to +13355
Variables defined in keywords and tests are checked by the separate
``missing-keyword-variable-type`` and ``missing-test-variable-type`` rules.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agent artifact without meaningful documentation value

Comment thread docs/rules_list.md
Comment on lines +13618 to +13619
VAR ${local} value
${result} = Some Keyword

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these be separate rules?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm personally leaning towards no right now. But if, at some point, types can be inferred from the keyword return value, this should maybe be split.

Comment on lines +67 to +68
Variables defined in keywords and tests are checked by the separate
``missing-keyword-variable-type`` and ``missing-test-variable-type`` rules.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More agent artifact without meaningful documentation value

41 |
42 | Keyword With Assignment
43 | ${result} = Set Variable value
| ^^^^^^^^^^^ ANN05

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the underline be ${result} or ${result} =

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split ANN01: missing-section-variable-type into multiple rules

2 participants