boakley / robotframework-lint

Linter for robot framework plain text files
Apache License 2.0
126 stars 48 forks source link

add rule for too many steps in test case #9

Closed guykisel closed 9 years ago

guykisel commented 10 years ago

Based on https://code.google.com/p/robotframework/wiki/HowToWriteGoodTestCases#Workflow_tests

"Max 10 steps, preferably less"

Example output:

W: 173, 0: Too many steps (13) in test case (TooManyTestSteps)
boakley commented 9 years ago

I'd like to include this rule, but I want it to be configurable. (see Configurable Rules on the wiki). I'll be glad to make it configurable if you want, or you can do it yourself. All you need to do is add a configure method that takes a string as a parameter and sets the maximum number allowed. You can see the otherRules.py:LineTooLong rule for an example.

Sorry it took so long for me to respond.

guykisel commented 9 years ago

No problem. I'll make the necessary changes.

guykisel commented 9 years ago

@boakley have you pushed the support for configurable rules to github yet? I can't find it in the project source, other than the reference you linked on the wiki.

boakley commented 9 years ago

My bad. I didn't realize I had a bunch of stuff I hadn't pushed. It should be there now.

https://github.com/boakley/robotframework-lint/commit/441f319a

On Wed, Jan 14, 2015 at 4:19 PM, Guy Kisel notifications@github.com wrote:

@boakley https://github.com/boakley have you pushed the support for configurable rules to github yet? I can't find it in the project source, other than the reference you linked on the wiki.

— Reply to this email directly or view it on GitHub https://github.com/boakley/robotframework-lint/pull/9#issuecomment-70003986 .

guykisel commented 9 years ago

Cool, thanks!

guykisel commented 9 years ago

@boakley I've implemented configurableness. If it looks to you like I've done it correctly, I'll do the same for my other rule PR.

boakley commented 9 years ago

Cool. I'll try to take a look at it this weekend.

On Fri, Jan 16, 2015 at 3:25 PM, Guy Kisel notifications@github.com wrote:

@boakley https://github.com/boakley I've implemented configurableness. If it looks to you like I've done it correctly, I'll do the same for my other rule PR.

— Reply to this email directly or view it on GitHub https://github.com/boakley/robotframework-lint/pull/9#issuecomment-70324633 .