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

Fix github formatter for missing final newline #6822

Merged
merged 2 commits into from Apr 27, 2023
Merged

Fix github formatter for missing final newline #6822

merged 2 commits into from Apr 27, 2023

Conversation

konomae
Copy link
Contributor

@konomae konomae commented Apr 27, 2023

To prevent unexpected string concatenation
@changeset-bot
Copy link

changeset-bot bot commented Apr 27, 2023

🦋 Changeset detected

Latest commit: 604b5b2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
stylelint Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

},
};
describe('githubFormatter', () => {
test('outputs no warnings', () => {
Copy link
Contributor Author

@konomae konomae Apr 27, 2023

Choose a reason for hiding this comment

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

Added case with no warnings

Comment on lines +73 to +74
::error file=a.css,line=20,col=3,title=Stylelint problem::Anonymous error
`);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The indentation change makes the modification appear larger, but the only thing that changes the result is the line break here.

});
});

lines.push('');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only place where the logic has changed.

@ybiquitous ybiquitous changed the title Add line break at the end of GitHub Formatter output Fix github formatter for missing final newline Apr 27, 2023
Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM 👍🏼

@ybiquitous ybiquitous merged commit 4dc4995 into stylelint:main Apr 27, 2023
14 checks passed
@konomae
Copy link
Contributor Author

konomae commented Apr 27, 2023

Thanks for the review and the changelog entry!

@konomae konomae deleted the github-formatter-last-line branch April 27, 2023 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

When using GitHub Formatter with pnpm, error codes are unintentionally combined in the last violation
2 participants