Skip to content

Add newline to the end of generated files #481

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

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

jhrcek
Copy link
Collaborator

@jhrcek jhrcek commented Jun 8, 2023

Followup on the huge PR I just saw merged: #478 ( CC @michaelpj)
Let's not forget newline at the end of generated files.

  • Many Unix/Linux tools expect or require this newline at the end of files. If it's missing, these tools might not be able to process the last line correctly, or they might throw warnings or errors.
  • The POSIX standard, which defines the core of Unix/Linux operating systems, requires each line to end with a newline character.

<> header <> hardline <> hardline
<> importSection
<> hardline <> hardline
<> doc <> hardline
Copy link
Collaborator Author

@jhrcek jhrcek Jun 8, 2023

Choose a reason for hiding this comment

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

The actual change is all the way down here: addition of hardline at the end of generated files. The remaining changes are just result of regenerating the files.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you!

Copy link
Collaborator

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

Thanks for catching this!

@michaelpj michaelpj enabled auto-merge June 8, 2023 09:20
@michaelpj michaelpj merged commit 9074106 into haskell:master Jun 8, 2023
@jhrcek
Copy link
Collaborator Author

jhrcek commented Jun 8, 2023

My pleasure. Thank you for implementing the generator logic. Hopefully it will make updating to newer LSP versions easier!

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.

2 participants