dotnet / dotnet/msbuild

Warn about WriteLinesToFile default behavior which is Append

Open
#11,927 7 comments 0 reactions 1 assignee Claimed by @iamhaseebn View on GitHub
help wanted triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

WriteLinesToFile appends by default unless you specify Overwrite. This is highly non-intuitive and probably almost never what the user intends.

Since we can't change the behavior, I propose to introduce a new optional parameter Append, that defaults to false, and if it's not specified and Overwrite is not specified, warn about it (that you should specify one or the other).

Not sure if a warning or a message, perhaps build check?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.