Open lusheldon opened 6 years ago
It is not possible to write a rule for a folder; rflint was designed to work on files. However, if you pass a folder to rflint, it will automatically search every robot file in that folder.
On Mon, Mar 19, 2018 at 4:34 AM, lusheldon notifications@github.com wrote:
Hi, thanks for your working firstly. I'm trying to walk every keyword in the suite folder to find out similar keywords in different resource file. But I was not able to add rules base on suite folder class. Is it possible to add rules for folder? Any reply would be greatly appreciated! @guykisel https://github.com/guykisel @boakley https://github.com/boakley
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/boakley/robotframework-lint/issues/50, or mute the thread https://github.com/notifications/unsubscribe-auth/ABEmYvCCh9nVDGjTxRcyAVenUSf_zZ4yks5tf3usgaJpZM4Sv1j8 .
hi @boakley, in relation to @lusheldon question. Is it possible to change the path of the builtin_rules
and the site-rules
? I have added the rflint folder in our GIT repository so that we'll have a central repo of the linter. Because before we have to manually "copy-paste" the custom rules on Python27\Lib\site-packages\rflint
, on every local machines. What I did is this:
I declared an Environment Variable RF_HOME = C:\rf-test
builtin_rules = os.environ['RF_HOME'] + '/rflint/rules' site_rules = os.environ['RF_HOME'] + '/rflint/site-rules'
but i'm having errors like this, so I guess I'm doing something wrong LOL
Error occurred when trying to run RfLint analysis RED python session problem. Following exception has been thrown by python service: Traceback (most recent call last): File "C:\Users\mluyun\AppData\Local\Temp\RobotTempDir8035181267158857483\robot_session_server.py", line 38, in inner result['result'] = func(*args, **kwargs) File "C:\Users\mluyun\AppData\Local\Temp\RobotTempDir8035181267158857483\robot_session_server.py", line 59, in inner return func(*args, **kwargs) File "C:\Users\mluyun\AppData\Local\Temp\RobotTempDir8035181267158857483\robot_session_server.py", line 255, in run_rf_lint raise RuntimeError('There is no rflint module installed for ' + sys.executable + ' interpreter') RuntimeError: There is no rflint module installed for C:\Python27\python.exe interpreter
TIA! 😄
P.S. I'm not really a programmer 😁 still learning python
Hi, thanks for your working firstly. I'm trying to walk every keyword in the suite folder to find out similar keywords in different resource file. But I was not able to add rules base on suite folder class. I don't understand how to pass the folder class into apply method in the rule class. Is it possible to add rules for folder? Any reply would be greatly appreciated! @guykisel @boakley