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
linter bear adds newline at end of file in process_output #6083
Comments
I'm sending a PR on this one. |
hello, I want to work on this issue. But I am new to open source. I have worked in a couple of difficulty/newcomer issue would this be an appropriate issue for me to work on? |
If @duddu-coder is working on this, it seems weird to me to work on the same issue, right? |
Previously a new line was appened at the end of the last line of the file even, made it so that coala checks first if a new line is present at the end of the file before appending the last line Closes coala#6083
Previously a newline was appened at EOF, made it so that coala checks first if a new line is present at the end of the file before appending the last line Closes coala#6083
Overview Description
A custom bear and providing your own process_output does not result in the correct
file
parameter, when the file in question does not end in a newline; the newline is added by the linter class.This is problematic for a bear that adds a newline at the end of a file.
Steps to Reproduce
Create a file that ends without newline
printf asd > test.txt
Run the bear and compare
coala -b TestBear -d . -f ./test.txt -I
Actual Results
As you you can see there is an additional newline.
Expected Results
Reproducibility
Every time
Additional Information:
Actually having the newline in the file results in the output:
The newline seems to only be added if there is none present.
The text was updated successfully, but these errors were encountered: