Closed aaltat closed 9 years ago
You can put them anywhere you want. They will be found automatically if they are in site-rules, but you can specify a fully qualified path with the --rulefile option.
On Sun, Feb 22, 2015 at 2:57 PM, Tatu Aalto notifications@github.com wrote:
When I write a custom rule, the wiki [1] says this: Custom rules should be put in the site-rules folder.
Is my assumption correct, that it should be in $PYTHONPATH/rflint/site-rules folder? Can it be changed to somewhere else, if I want to put those files more easily in version control system?
[1] https://github.com/boakley/robotframework-lint/wiki/How-to-write-custom-rules
— Reply to this email directly or view it on GitHub https://github.com/boakley/robotframework-lint/issues/28.
I tried the --rulefile argument like so but nothing gets executed. If I put the exact same python script in $PYTHONPATH/rflint/site-rules, then it is executed.
rflint -v -r --rulefile /tmp/lintframework.py -i DuplicateKeywordNames -i DuplicateTestNames -i FileTooLong -i InvalidTable -i LineTooLong -i PeriodInSuiteName -i PeriodInTestName -i RequireKeywordDocumentation -i RequireSuiteDocumentation -i RequireTestDocumentation -i TagWithSpaces -i TooManyTestCases -i TooManyTestSteps -i TrailingBlankLines
tests/
That looks like a bug. Thanks for the report. I'll try to fix it in the next day or two.
On Wed, May 27, 2015 at 4:36 PM, jaloren notifications@github.com wrote:
I tried the --rulefile argument like so but nothing gets executed. If I put the exact same python script in $PYTHONPATH/rflint/site-rules, then it is executed.
rflint -v -r --rulefile /tmp/lintframework.py -i DuplicateKeywordNames -i DuplicateTestNames -i FileTooLong -i InvalidTable -i LineTooLong -i PeriodInSuiteName -i PeriodInTestName -i RequireKeywordDocumentation -i RequireSuiteDocumentation -i RequireTestDocumentation -i TagWithSpaces -i TooManyTestCases -i TooManyTestSteps -i TrailingBlankLines tests/
— Reply to this email directly or view it on GitHub https://github.com/boakley/robotframework-lint/issues/28#issuecomment-106086346 .
When I write a custom rule, the wiki [1] says this: Custom rules should be put in the site-rules folder.
Is my assumption correct, that it should be in $PYTHONPATH/rflint/site-rules folder? Can it be changed to somewhere else, if I want to put those files more easily in version control system?
[1] https://github.com/boakley/robotframework-lint/wiki/How-to-write-custom-rules