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

Only add diffs to .rs files #39

Merged
merged 3 commits into from
Dec 11, 2019

Conversation

oScape
Copy link
Contributor

@oScape oScape commented Dec 10, 2019

Regarding #32, I add a check on the Parser for add only the .rs files and avoid the others.

Includes test functionality.

Copy link
Owner

@o0Ignition0o o0Ignition0o left a comment

Choose a reason for hiding this comment

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

The code seems correct, and you even thought of adding tests 🎉
I'm going to merge it, and create an followup issue to refactor the function because it's getting a bit big ^^

Great job, and thanks for your contribution !

@@ -239,4 +242,22 @@ mod tests {
// Assert
assert_eq!(expected_sections, actual_sections);
}
#[test]
fn test_diff_several_extensions_files() {
Copy link
Owner

Choose a reason for hiding this comment

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

Really happy to see we have a new test !
As a followup maybe we could add an example with a .rs file and a non .rs file in the same diff ?

Copy link
Contributor Author

@oScape oScape Dec 11, 2019

Choose a reason for hiding this comment

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

I already add a test with a .rs and a .yml file, I think we can improve the test by adding a multi diff on the same .rs file for covering it all.

Copy link
Owner

Choose a reason for hiding this comment

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

Yeah I actually meant that.
We can do it in a followup PR though, it's pretty fine already :)

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.

None yet

2 participants