Skip to content

Commit

Permalink
add .gitattributes info to NormalizeCRLFToLF global
Browse files Browse the repository at this point in the history
Signed-off-by: Filinto Duran <filinto@diagrid.io>
  • Loading branch information
filintod committed Aug 24, 2023
1 parent 9600b7f commit 5bd332b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions golden/golden.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ type helperT interface {
// in the environment before running tests.
//
// The default value may change in a future major release.
//
// This does not affect the contents of the golden files themselves. And depending on the
// git settings on your system (or in github action platform default like windows), the
// golden files may contain CRLF line endings. You can avoid this by setting the
// .gitattributes file in your repo to use LF line endings for all files, or just the golden files, by
// adding the following line to your .gitattributes file:
//
// * text=auto eol=lf
var NormalizeCRLFToLF = os.Getenv("GOTESTTOOLS_GOLDEN_NormalizeCRLFToLF") != "false"

// FlagUpdate returns true when the -update flag has been set.
Expand Down

0 comments on commit 5bd332b

Please sign in to comment.