Skip to content

Improve generated code detection to look for <auto-generated> comments at top of file - #31

Merged
DustinCampbell merged 3 commits into
masterfrom
issue-16
Aug 26, 2015
Merged

DustinCampbell merged 3 commits into
masterfrom
issue-16

Conversation

@DustinCampbell

Copy link
Copy Markdown
Owner

Fixes #16

Comment thread Source/CSharpEssentials/Extensions.cs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Try this: string.Compare(s, startIndex, value, 0, value.Length, StringComparison.Ordinal) == 0

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Thanks!

@pharring

Copy link
Copy Markdown
Contributor

👍

@DustinCampbell

Copy link
Copy Markdown
Owner Author

@CyrusNajmabadi might also be interested in reviewing

Comment thread Source/CSharpEssentials/Extensions.cs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This check is redundant because string.Compare will do it too.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Sigh... thanks Paul. 😞

@pharring

Copy link
Copy Markdown
Contributor

👍

1. Fix unit tests that were written incorrectly and would always pass.
2. Use string.Compare rather than a custom Matches helper method.
DustinCampbell added a commit that referenced this pull request Aug 26, 2015
Improve generated code detection to look for <auto-generated> comments at top of file
@DustinCampbell
DustinCampbell merged commit f1daff9 into master Aug 26, 2015
@DustinCampbell
DustinCampbell deleted the issue-16 branch September 5, 2015 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants