$ sherlock
Sherlock analysis of Robot Framework code:
Using <home_path>/sources/sherlock_test as source repository
Traceback (most recent call last):
File "<home_path>/.pyenv/versions/3.8.15/envs/sherlock/lib/python3.8/site-packages/robot/running/builder/builders.py", line 177, in _build_suite
self._validate_execution_mode(suite)
File "<home_path>/.pyenv/versions/3.8.15/envs/sherlock/lib/python3.8/site-packages/robot/running/builder/builders.py", line 191, in _validate_execution_mode
raise DataError(f"Conflicting execution modes. File has {this} "
robot.errors.DataError: Conflicting execution modes. File has tests but files parsed earlier have tasks. Fix headers or use '--rpa' or '--norpa' options to set the execution mode explicitly.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<home_path>/.pyenv/versions/sherlock/bin/sherlock", line 8, in <module>
sys.exit(run_cli())
File "<home_path>/.pyenv/versions/3.8.15/envs/sherlock/lib/python3.8/site-packages/sherlock/__init__.py", line 19, in run_cli
raise err
File "<home_path>/.pyenv/versions/3.8.15/envs/sherlock/lib/python3.8/site-packages/sherlock/__init__.py", line 9, in run_cli
runner.run()
File "<home_path>/.pyenv/versions/3.8.15/envs/sherlock/lib/python3.8/site-packages/sherlock/core.py", line 29, in run
suite = TestSuiteBuilder().build(self.config.path)
File "<home_path>/.pyenv/versions/3.8.15/envs/sherlock/lib/python3.8/site-packages/robot/running/builder/builders.py", line 91, in build
suite = parser.parse(structure)
File "<home_path>/.pyenv/versions/3.8.15/envs/sherlock/lib/python3.8/site-packages/robot/running/builder/builders.py", line 138, in parse
structure.visit(self)
File "<home_path>/.pyenv/versions/3.8.15/envs/sherlock/lib/python3.8/site-packages/robot/parsing/suitestructure.py", line 46, in visit
visitor.visit_directory(self)
File "<home_path>/.pyenv/versions/3.8.15/envs/sherlock/lib/python3.8/site-packages/robot/parsing/suitestructure.py", line 166, in visit_directory
child.visit(self)
File "<home_path>/.pyenv/versions/3.8.15/envs/sherlock/lib/python3.8/site-packages/robot/parsing/suitestructure.py", line 44, in visit
visitor.visit_file(self)
File "<home_path>/.pyenv/versions/3.8.15/envs/sherlock/lib/python3.8/site-packages/robot/running/builder/builders.py", line 144, in visit_file
suite, _ = self._build_suite(structure)
File "<home_path>/.pyenv/versions/3.8.15/envs/sherlock/lib/python3.8/site-packages/robot/running/builder/builders.py", line 179, in _build_suite
raise DataError(f"Parsing '{source}' failed: {err.message}")
robot.errors.DataError: Parsing '<home_path>/sources/sherlock_test/test_robot.robot' failed: Conflicting execution modes. File has tests but files parsed earlier have tasks. Fix headers or use '--rpa' or '--norpa' options to set the execution mode explicitly.
Fatal exception occurred. You can create an issue at https://github.com/bhirsz/robotframework-sherlock/issues . Thanks!
Thanks for the report, I'm getting back to Sherlock and I will try to fix it. I believe we should handle both (tasks and tests) without need to set --rpa/--no-rpa options.
If we have example two files:
├── rpa_test.robot └── test_robot.robot
rpa_test.robot
:test_robot.robot
:We got error: