Closed Kamilcuk closed 2 years ago
So, #55 removed both the \r and the \n, whereas the bug report just wanted the \r gone. OK then, so let's try adding a \n in my report format:
$ go run github.com/mrtazz/checkmake/cmd/checkmake@latest --format='{{.FileName}}:{{.LineNumber}}:{{.Rule}}:{{.Violation}}\n' Makefile
Makefile:7:maxbodylength:Target body for "help" exceeds allowed length of 5 (6).\nMakefile:127:minphony:Missing required phony target "all"\nMakefile:127:minphony:Missing required phony target "test"\nexit status 3
The \n is being output literally.
go run
?).
Expected behaviour
Weeell, do not output CR on Linux.
Actual behaviour
Weeell, outputs CR character on Linux.
Output of
checkmake --version
Compiled on archlinux today, installed from AUR.
Output of
checkmake --debug <your makefile>
Output of
make --version
Sample Makefile to reproduce issue
So I was trying to integrate checkmake with https://github.com/iamcco/coc-diagnostic, spend good 2 hours figuring why it does not work. Seems like coc-diagnostic does not like CR characters (which I will
tr -d '\'r
fix on my config side) but I believe *unix tools shouldn't output CR characters anyway. I tried reading the source code, but I know nothing about go, so I do not know where to fix.Thanks for this amazing project.