Skip to content
This repository has been archived by the owner on Dec 23, 2018. It is now read-only.

add multi mock config file support #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

XiaoboHe
Copy link

@XiaoboHe XiaoboHe commented Jun 27, 2018

Improve the "-r --rules" arg, and add multi mock config file support

# if only one mock config file
turq -r $config_file_path

# if many mock config files
turq -r $config_file_dir

please refer to the issue @#11

Copy link
Owner

@vfaronov vfaronov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your effort. However, this needs more work.

When there’s an error in the rules code (during parsing or execution), Turq reports the error’s line number. With your change, that number becomes useless, because it’s now the line number in some concatenation of multiple files.

To deal with this properly, you would need to change how Turq parses and executes rules code and reports errors. And, as discussed in #11, I’m not sure this is a good idea for Turq.

There are also a few smaller problems with your code (missing paths are silently ignored; no tests; no docs).

If you like, feel free to try and improve this, but I can’t promise to merge this anytime soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants