Conversation
5 tasks
3cfc530 to
8ac4805
Compare
... about a mismatch in line endings when the code "template" is defined using a heredoc with Linux line endings, while the code snippets being inserted into the code "template" were using line endings matching the OS on which the tests were being run.
8ac4805 to
61d18c1
Compare
…ectively When either the `--sniffs=...` CLI parameter is used, or the `--exclude=...` CLI parameter, the `File::addMessage()` method bows out when an error is passed which is not for one of the selected sniffs/is for one of the excluded sniffs. Unfortunately, this "bowing out" did not take `Internal` errors into account, meaning those were now hidden, while those should _always_ be thrown as they generally inform the end-user of something seriously wrong (mixed line endings/no code found etc). Fixed now. Includes updating four test files to allow for seeing internal errors. Also includes some dedicated tests to make sure that this doesn't interfere with the ability to silence `Internal` errors from within a ruleset file.
61d18c1 to
0451fd9
Compare
fredden
approved these changes
Apr 15, 2025
rodrigoprimo
approved these changes
Apr 15, 2025
petitphp
approved these changes
Apr 15, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Recreation of upstream PR squizlabs/PHP_CodeSniffer#3915 + rebased against the 4.0 branch:
👆🏻 Note: I've decided to err on the side of caution and have moved this PR to the 4.0 branch now.
Suggested changelog entry
Changed:
--sniffsCLI argument is used.Types of changes