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

Add new line at end of githubWorkflowGenerate files #72

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

mdedetrich
Copy link
Contributor

This PR resolves #69. As can be seen, the solution is a very simple one where we just use BufferedWriter.newLine after we write the contents. The advantage here is none of the tests needed to be adjusted since the tests compare String outputs from compileWorkflow which happens before any file generated and hence the disadvantage is that this codepath is not tested since there is no existing test that makes use of githubWorkflowGenerate.

@djspiewak Do you want me to write a test for this, and if so how would you like to do it? Simplest thing I can think of is to move some code out of githubWorkflowGenerate into a function and to write a simple test that some generated files end with a new line?

@djspiewak
Copy link
Collaborator

I'm okay with it being an untested codepath. It's kind of a boundary condition. I do suspect though that this is going to cause the workflow checks to fail.

@mdedetrich
Copy link
Contributor Author

I do suspect though that this is going to cause the workflow checks to fail.

Should I write a test for this then?

@djspiewak
Copy link
Collaborator

Should I write a test for this then?

Nah, if it was going to fail, it would have failed the scripted tests. Apparently it's fine! :-)

@djspiewak djspiewak merged commit a18599e into sbt:main Jul 13, 2021
@mdedetrich mdedetrich deleted the add-new-line-at-end-of-file branch July 13, 2021 17:20
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.

Autogenerated .yml files don't have newline at end of file
2 participants