Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for an "include" option #950

Merged
merged 1 commit into from
Mar 30, 2018
Merged

Conversation

nickffox
Copy link
Contributor

  • Added support for -i or -include which has the opposite behavior of the exclude flag
  • Updated file filtering to account for include flag

Addresses #949

@nickffox nickffox changed the title [WIP] Add support for an "include" option Add support for an "include" option Mar 28, 2018
@nickffox
Copy link
Contributor Author

This implementation is used internally by our team. Opening this PR to facilitate discussion.

Copy link
Collaborator

@johnfairh johnfairh left a comment

Choose a reason for hiding this comment

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

Thanks for the patch, looks fine to me -- just a couple of nitpicks. Could you also please update the README 'controlling what is documented' section to describe the flag and how it interacts with --exclude?

CHANGELOG.md Outdated
@@ -5,8 +5,11 @@
* None.

##### Enhancements

* None.
--------------------------------------------------------------------------------
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't need this line, see style in the rest of the file. Could drop the 'to jazzy' part too, I think the context is clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

included_files = Config.instance.included_files
json.map do |doc|
key = doc.keys.first
doc if included_files.detect do |foo|
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe a better variable name :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops! 🤦‍♂️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nickffox
Copy link
Contributor Author

@johnfairh I've addressed your feedback and updated the README. Let me know what you think!

@johnfairh
Copy link
Collaborator

LGTM - could you squash these commits please?

 * Added support for -i or -include which has the opposite behavior of the exclude flag
 * Updated file filtering to account for include flag
 * Updated README and documentation
@nickffox
Copy link
Contributor Author

@johnfairh squashed 👍

@johnfairh johnfairh merged commit 04c78b8 into realm:master Mar 30, 2018
@johnfairh
Copy link
Collaborator

Great - thank you.

@jpsim
Copy link
Collaborator

jpsim commented Apr 1, 2018

🎉

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

Successfully merging this pull request may close these issues.

3 participants