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
configurable terms for todo-in-comment #674
Conversation
Like you probably noticed our 'test framework' auto generates test for all rules with default configs. To test rule with custom config we can use following file: https://github.com/MarketSquare/robotframework-robocop/blob/master/tests/atest/custom_tests.yaml Either add entry with name of the rule / or update if the rule is already there with your desired config and path to test data files. For example:
Runs two separate tests for rule This:
is equivalent of running (in the tests/atest directory):
Config can be single string (if you're only configuring one param) or list of strings (after #672 will be merged). But I think you don't need to configure more than one param per test so you don't need to wait for 672 and just use string for configuration. |
Edit - I did not put this information in contributing docs. Uh! |
Codecov Report
@@ Coverage Diff @@
## master #674 +/- ##
=======================================
Coverage 97.40% 97.40%
=======================================
Files 23 23
Lines 2886 2893 +7
=======================================
+ Hits 2811 2818 +7
Misses 75 75
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
e9462a5
to
1d00d9d
Compare
Something hassle with WIN environment. I try to fix that by guessing the problem is with Unicode characters. Unfortunately, I don't have WIN device available anytime soon. I need to postpone the PR a few days to find one 😓 |
I can try to run in - I will let you know. From the results I also see it's running some of the tests that should be disabled by default (like benchmark test). It's most likely because of the 'tox -> nox' migration that happened recently. I will fix that one too |
There is problem with encoding, but it's not connected to your PR. All values passed to arguments/options are affected by it. I need to think about solution - it's not easy mix of argparse & encoding for specific platform |
Another update - it might be also issue in how I read the test data. There is hope! |
Ok, thanks for checking. I'll rollback the latest commit to keep PR simple. |
Ups, for some reason the PR auto closed itself - working on the fix. |
No worries, I could create new one. |
I can't do it easily due to missing permissions (forked repo). Can you revert this PR somehow>? If not I can investigate more. To get it working on windows you need to add
and here:
|
Looks good now! I will leave few comments regarding lower/upper case, it's not strictly connected to your changed but my though in general for this rule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition! Thanks, @rikerfi ! And sorry for being so nit-picky! 😉
Hah, no worries. Reviews are the right place for that 😄 |
It would be good if
todo-in-comment
rule has configurable terms.E.g.
robocop --configure todo-in-comment:todos:OMG,bug
also this workrobocop --configure "todo-in-comment:todos:remove me,fix this ugly bug"
This should enable also terms in local language.Work in progress: documentation, testsWhat would be the best location to place rule configuration tests?