Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] load-transformers option is not parsed from the configuration file #576

Closed
jaudiger opened this issue Sep 7, 2023 Discussed in #575 · 1 comment · Fixed by #647
Closed

[Bug] load-transformers option is not parsed from the configuration file #576

jaudiger opened this issue Sep 7, 2023 Discussed in #575 · 1 comment · Fixed by #647
Assignees
Labels
bug Something isn't working

Comments

@jaudiger
Copy link

jaudiger commented Sep 7, 2023

Discussed in #575

Originally posted by jaudiger September 7, 2023
Hi,

I wanted to know how to properly load an external transformer by setting the transformer inside the pyproject.toml file?

This is my project file:

[tool.robotidy]
load-transformers = [".robotidy/examples_transformer.py"]

But when I tries to run robotics, I got the following error:

> robotidy file.robot
                                                                                                                                                                                                       
 Usage: robotidy [OPTIONS] [PATH(S)]                                                                                                                                                                   
                                                                                                                                                                                                       
 Try 'robotidy -h' for help.                                                                                                                                                                           
╭─ Error ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ No such option: load_transformers                                                                                                                                                                   │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
                                                        

Thanks !

@bhirsz
Copy link
Member

bhirsz commented Sep 8, 2023

Thanks for the report, I have identified two issues:

  • we are using both load-transformers and custom-transformers option names (which is fine) but we're only handling "custom-transformers" in the file configuration
  • documentation only mentions "load-transformer" (and with typo - no s)

@bhirsz bhirsz added the bug Something isn't working label Sep 8, 2023
@bhirsz bhirsz changed the title How to load an external transformer from a pyproject.toml ? [Bug] load-transformer option is not parsed from the configuration file Sep 11, 2023
@bhirsz bhirsz changed the title [Bug] load-transformer option is not parsed from the configuration file [Bug] load-transformers option is not parsed from the configuration file Sep 11, 2023
@bhirsz bhirsz self-assigned this Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants