Repository navigation
Expand file tree
/
Copy path.gitattributes
More file actions
29 lines (26 loc) · 1.72 KB
/
Copy path.gitattributes
File metadata and controls
29 lines (26 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Generated, committed artifacts. They must stay in the tree (//go:embed
# resolves them at compile time and `go install` has no generate step),
# but they're derived from a source of truth - never hand-edit them, run
# `make generate`. linguist-generated folds them in GitHub diffs and drops
# them from language stats so a derived-file diff isn't mistaken for a
# source change. eol=lf keeps the go:embed'd corpora LF on every platform:
# without it a Windows (autocrlf) checkout bakes CRLF into the binary, and the
# `rad docs` snapshot tests then fail on the line-ending mismatch.
core/embedded_docs/** linguist-generated=true text eol=lf
rts/embedded_funcs/** linguist-generated=true text eol=lf
rts/embedded/functions.txt linguist-generated=true text eol=lf
rts/signatures_gen.go linguist-generated=true
docs-web/docs/reference/functions.md linguist-generated=true
docs-web/docs/reference/errors.md linguist-generated=true
# Per-function doc source of truth, mirrored byte-for-byte into the embedded
# copy (rts/embedded_funcs/) with a test asserting they match - so the source
# must share the embedded copy's LF endings on every platform.
docs/funcs/** text eol=lf
# More go:embed'd corpora that must stay LF for the same reason as above:
# built-in command scripts (their header docs end up in usage strings, which
# snapshot tests compare) and error-code docs.
core/embedded/** text eol=lf
core/error_docs/** text eol=lf
# Test fixtures that `rad fmt --check` compares byte-for-byte against the
# formatter's LF output - a CRLF checkout makes every file "unformatted".
core/testing/rad_scripts/** text eol=lf