-
Notifications
You must be signed in to change notification settings - Fork 545
baseline: normalize newlines in error messages #5
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
Closed
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
8f225e9
baseline: normalize newlines in error messages
staabm e9099bb
Update BaselineNeonErrorFormatter.php
staabm 95c267e
Added testFormatErrorMessagesNormalizedNewlines
staabm decac4f
fix CS
staabm b78c241
normalize newlines to allow working with ignore-patterns indepent of …
staabm 4d6204c
added testcase with newlines in phpdoc
staabm accec36
added docs for the docs
staabm fd47110
fix typo
staabm ee8fcbb
added test-file with windows line-endings
staabm 981abea
enforce windows line-endings via .gitattributes
staabm af2705b
fix CS
staabm 644a34c
fixed assertion
staabm bc5f53e
fixed another assertion
staabm 6d5f486
Throw Exception on preg errors
staabm dd48780
Throw Exception on preg errors
staabm 547d3b5
Fix CS
staabm 33c60ef
Update BaselineNeonErrorFormatter.php
staabm 952e2b5
fix CS
staabm d7c2924
fix exception message
staabm cf9bde2
fix CS
staabm f8a5bec
fix newline replacement
staabm 582862e
fix test
staabm fe854e0
added docs
staabm 5a444da
fix test
staabm 7e4a5b2
fix test expectations
staabm b0d008f
removed dead code
staabm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| tests/PHPStan/Command/ErrorFormatter/data/WindowsNewlines.php eol=crlf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tests/PHPStan/Command/ErrorFormatter/data/WindowsNewlines.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| <?php | ||
|
|
||
| namespace BaselineIntegration; | ||
|
|
||
| class WindowsNewlines { | ||
|
||
|
|
||
| /** | ||
| * The following phpdoc is invalid and should trigger a error message containing newlines. | ||
| * | ||
| * @param | ||
| * $object | ||
| */ | ||
| public function phpdocWithNewlines($object) { | ||
| } | ||
|
|
||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we need to change this assertion because of the newly added testfiles under data/