boakley / robotframework-lint

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

Provide an option for treating all warnings as errors #36

Closed php-coder closed 7 years ago

php-coder commented 7 years ago

Could you provide a single option for turning all warnings into errors and exiting the program with non-zero status?

boakley commented 7 years ago

That feature already exists. Use rflint --error all ...

php-coder commented 7 years ago

Unfortunately I didn't know this. Where is it documented?

boakley commented 7 years ago

It's documented in the output from rflint --help

php-coder commented 7 years ago

It turned out that --error all should be the first option otherwise it could lead to strange result where --ignore won't work:

$ rflint --ignore TooFewKeywordSteps --configure LineTooLong:130 --error=all src/test/robotframework 
+ src/test/robotframework/series/access.robot
E: 27, 0: Too few steps (1) in keyword (TooFewKeywordSteps)
+ src/test/robotframework/series/creation/logic.robot
E: 35, 0: Too many steps (35) in test case (TooManyTestSteps)
E: 69, 0: Too few steps (1) in keyword (TooFewKeywordSteps)
E: 86, 0: Too few steps (1) in keyword (TooFewKeywordSteps)
$ rflint --error=all  --ignore TooFewKeywordSteps --configure LineTooLong:130 src/test/robotframework 
+ src/test/robotframework/series/creation/logic.robot
E: 35, 0: Too many steps (35) in test case (TooManyTestSteps)