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
Embedded keywords with variable are treated as not capitalised #238
Comments
What robocop version are you using? This should work fine with actual in pip and its definietly working with new version 1.2.0 (which is going to be released to pip very soon). See this acceptance test:
|
@bhirsz a bit older, 1.1.0 I believe. Thanks!:) |
@bhirsz how about embedded keywords without variables? I have such calls in tests:
And Keyword capitalization warning is triggered. Checked on 1.2.0 |
We're lacking this feature #195 . Since we don't have robot context we cannot resolve keyword names with their definitions (and discover what is embedded keyword and what not). This also affects other rules. I will set it as high priority because it will be also enabler for many new rules (such as variable naming depending of scope, keyword usage etc). |
In meantime if it's not often occurence and you want to get rid of warnings you can use disabler:
or
|
@bhirsz, nice hints, thanks. Awesome idea with context :) |
I created a very small change but it partly supports embedded keywords now. If you run robocop on: But all embedded values without variable notation will not be recognized because we do not read the context. |
@mnojek I guess I'm tricky user, but without robot context it seems to be hard/impossible to find embedded keywords usage:
|
@MaciejWiczk I know, you're right. But this requires a whole another massive feature, which I do not plan to implement at this moment :) I'm focusing now on fixing bugs and adding some new rules. |
Let's keep it open for now because reading the context is on our roadmap - although I agree it's a lot of work (but I hope to steal some knowledge from other open source tools that are dealing with keyword definition information ;)) |
Closing it since we decided some time ago that we will not implement context reading. |
Describe the bug
Embedded keywords with variable are treated as not capitalised, while IMHO they are fine formatted.
To Reproduce
Run robocop against file containing following code
Results in
[W] 0302 Keyword name should be capitalized
message form RobocopExpected behavior
Since common approach to variables is to have them lowercased or uppercase, for global variables/Constans, rule should ignore embedded variable casing.
The text was updated successfully, but these errors were encountered: