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 regexp second test for vref filespecs #1919

Merged
merged 3 commits into from
Oct 26, 2016

Conversation

politas
Copy link
Member

@politas politas commented Oct 20, 2016

Closes #1918
Shouldn't impact any existing $vref filespecs, as they all have complete paths.

remoteIndex = i;
break;
}
else if (Regex.IsMatch(files[i].Name, internalFilePath))
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider instead if (internalFilePath.Equals(files[i]?.Name) || Regex.IsMatch(files[i]?.Name, internalFilePath))

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought about combining the tests, and it probably makes sense to do it that way. We're not cycling through the list a second time for the other test.

Hang on, what's the "?" you've got there?

Copy link
Member

Choose a reason for hiding this comment

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

the "?" declares a nullable type, and means that the type before it may have a null value.

@ayan4m1 ayan4m1 added Enhancement New features or functionality Schema Issues affecting the schema labels Oct 23, 2016
@politas
Copy link
Member Author

politas commented Oct 25, 2016

The schema is for .ckan files, not .netkan files, so this doesn't affect it.

@politas politas changed the title Add regexp second test for filespecs Add regexp second test for vref filespecs Oct 26, 2016
@politas politas merged commit 545e591 into KSP-CKAN:master Oct 26, 2016
@politas politas removed pull request Schema Issues affecting the schema labels Oct 26, 2016
@politas politas deleted the feature/1918-AddRegextoVref branch October 26, 2016 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New features or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants