As a developer,
I need to put the newline as a last character in files (if it is allowed by the file format),
so that I can maintain a good style of the codebase and I will not be shown "No newline at end of file" warnings when doing a git diff.
Why is it considered a good style to add newline at the end of file:
0.5 hours
@gingerkirsch I added the ## Description line that was missing from the Issue template you adapted ;)
Thank you for reporting this, I was aware that this could be done but never got the chance to create this.
I will make this a "First Timers Only" issue 馃帀
Hey @gingerkirsch! I'd like to take up this issue, can you assist me on how I can go about solving it? i.e. How do I search for files with the "no new line at end of file" issue? Thank you in advance!
^I guess you can tell that I am pretty new to all this haha, I'd really appreciate any help/guidance
Hello @KING-SID , so you should check all files and then place the cursor in the end. Imagine a text file - if you walk down with cursor and can reach a separate line with no text means the file is correct. If the most far place the cursor can get contains text - you need to hit enter :) But only once, otherwise git diff will show you read lines for everything that goes extra. Before commit you do git diff, let's say in git gui. You should have no warnings of "no newline at end of file" and no red lines. Something like this.
@gingerkirsch did you assign this issue to @KING-SID or is it free
@Chromicle this is a first timers only issue, you have a PR already in place and I'm thinking it's valid not sure, I have to check it later. So please choose issues not labeled as "First timers only"
@gingerkirsch Thanks for letting me know, I will get right to it! How do I get assigned to a task?
@KING-SID you should request to work on this feature and then it is up to maintainer to decide if you can proceed with it or not.
@gingerkirsch Thanks for letting me know!
To the maintainers:
I would like to work on this feature, kindly let me know if I can proceed with it. It's relatively simple and I think it would be a great way for me to begin contributing to Systers!
Hello! I would like to take up this issue. I am completely new to this so can someone please help me out in figuring out how to go about this.??
Thanks in advance!!
Hey @gingerkirsch @isabelcosta I have submitted a pull request that solves the issue. What are the next steps to getting it reviewed and merged? Please give me any feedback that could help me improve the PR if it is lacking in any way. Thank you!!!
Fixed on PR #191
Most helpful comment
Hello @KING-SID , so you should check all files and then place the cursor in the end. Imagine a text file - if you walk down with cursor and can reach a separate line with no text means the file is correct. If the most far place the cursor can get contains text - you need to hit enter :) But only once, otherwise git diff will show you read lines for everything that goes extra. Before commit you do git diff, let's say in git gui. You should have no warnings of "no newline at end of file" and no red lines. Something like this.