Fix lint to avoid generating binlog file#1879
Conversation
Change dotnet#1867 breaks running lint on Windows since it will reformat pretty much all the source files in the repo (change of newline). So I reverted that change 74fb9a9. Additionally latest lint writes formatDiagnosticLog.binlong next to the solution file when running with --verbosity diagnostic. There's no way to redirect or disable this - dotnet/format#1041. So this change disables --verbosity diagnostic for local runs of lint and adds it only to the CI (where the machine will clean the enlistment anyway).
I think this is because all files you have on disk are still checked out with LF line endings, despite the config change. There is probably some git command to fix that, but deleting your entire local clone and cloning again will fix that for sure. I was hitting problems with the LF line endings too and I would have done Andy's change myself, but he pre-empted me (I was already asking about this in the pull request that introduced it #20 (comment)). I was happy to see it changed. Going back to LF would be a step back. |
Git usually handles this correctly, and there are a number of problems with using LF locally on Windows.
|
I'm changing this PR to only fix the binlog - the newlines is still broken for me. Tried a new clone of the repo - lint still edits almost 600 files. I don't understand how it's supposed to work - to me there's a mismatch between GIT and lint/editorconfig.
|
|
Yes, I got confused - the pull request I'm referencing in #20 (comment) is a change to gitattributes. I didn't realized we also have this setting in editorconfig and those two formats look too similar. I thought Andy changed gitattributes. We should change that one too to match. |
Latest lint writes formatDiagnosticLog.binlong next to the solution file when running with --verbosity diagnostic. There's no way to redirect or disable this - dotnet/format#1041. So this change disables --verbosity diagnostic for local runs of lint and adds it only to the CI (where the machine will clean the enlistment anyway). Commit migrated from dotnet/linker@db52b51
Latest lint writes formatDiagnosticLog.binlong next to the solution file when running with --verbosity diagnostic. There's no way to redirect or disable this - dotnet/format#1041.
So this change disables --verbosity diagnostic for local runs of lint and adds it only to the CI (where the machine will clean the enlistment anyway).