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: file end of line character changes #197

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

stevenh
Copy link
Collaborator

@stevenh stevenh commented Dec 17, 2023

Maintain the current predominant end of line character for files when making edits. This changes editing to use the standard TextEdit insert and replace creation methods to reduce complexity and overhead.

Fix callback handling in tests, adding missing await and reject handling.

Use option chaining and early return in getUpdatedSource to improve readability.

Remove use of deprecated isNullOrUndefined.

Disable mega linter commits to forks, which will fail anyway.

Fixes #176

Readiness Checklist

Author/Contributor

  • Add entry to the CHANGELOG.md listing the change and linking to the corresponding issue (if appropriate)
  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, enhancement, infrastructure, or performance

@stevenh stevenh force-pushed the fix/maintain-file-eol branch 6 times, most recently from 59a78fc to 5b5451a Compare December 17, 2023 23:21
@stevenh stevenh marked this pull request as ready for review December 17, 2023 23:46
Maintain the current predominant end of line character for files when
making edits. This changes editing to use the standard TextEdit insert
and replace creation methods to reduce complexity and overhead.

This only handles Unix '\n' and Windows '\r\n' line endings, not pre
MacOSX Mac '\r' as CodeNar doesn't appear to support that line ending.

Fix callback handling in tests, adding missing await and reject
handling.

Validate each file result in folder lint test instead of total.

Use option chaining and early return in getUpdatedSource to improve
readability.

Remove use of deprecated isNullOrUndefined.

Fixes nvuillam#176
Disable mega linter generation of commits to repo forks as this will
generally fail.
Copy link
Owner

@nvuillam nvuillam left a comment

Choose a reason for hiding this comment

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

PR of great quality as usual :)

@nvuillam nvuillam merged commit c803569 into nvuillam:main Dec 18, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

End of lines characters are altered by fixes
2 participants