MarketSquare / MarketSquare/robotframework-tidy

[Enhancement] Enable selected transformers in formatted file

Open
#654 0 comments 0 reactions 1 assignee View on GitHub

@bhirsz is already working on this.

Since Mar 11, 2024.

enhancement
Dominant language
RobotFramework
Stars
113
Forks
16
PR merge metrics
No merged PRs in 30d

Description

It would be nice to be able to enable a transformer or another from within the file.

For instance, let's say my robotidy configuration files states that SmartSortKeywords transformer is disabled.

Then maybe for some files I actually want to activate it.

I am using VSCode format on save, rather than manually running robotidy now and then, or from the CI.

It would be convenient that I can activate a transformer using a comment, like it is possible for robocop rules.
# robocop: on=rule1

For our example here, something like:

# robotidy: enable=SmartSortKeywords (on is as good as enable as far as I can tell).

Which could be added at the beging of the file, or in the *** Keywords *** section.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.