You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since snaps from expect_snapshot_*() are automatically generated, they should be treated differently by tooling.
For example, I wouldn't want to run a linter on them.
There's a (somewhat widely?) used "standard", the @generated marker for this purpose: https://generated.at
The @generated marker is specifically for generated files which should be committed to SCM
(so not.gitignored).
For example, GitHub's super-linter can be set up to ignore all files thus marked.
I've so far made do with my own transformer like so:
Happy to add a PR to this effect, if people find this useful.
(The transform arguments docs suggest a different use,
so @generated probably shouldn't happen via that argument.
Needs some care as to how this can be wrapped in different file formats, i.e. for markdown "<!--@generated-->" seemed idiomatic.
The text was updated successfully, but these errors were encountered:
Since snaps from
expect_snapshot_*()
are automatically generated, they should be treated differently by tooling.For example, I wouldn't want to run a linter on them.
There's a (somewhat widely?) used "standard", the
@generated
marker for this purpose: https://generated.atThe
@generated
marker is specifically for generated files which should be committed to SCM(so not
.gitignore
d).For example, GitHub's super-linter can be set up to ignore all files thus marked.
I've so far made do with my own
transform
er like so:https://github.com/dataheld/elf/blob/0fbc0fdbac7db70c0751b00819423fd58ce1f39e/R/tests.R#L1-L18
Happy to add a PR to this effect, if people find this useful.
(The
transform
arguments docs suggest a different use,so
@generated
probably shouldn't happen via that argument.Needs some care as to how this can be wrapped in different file formats, i.e. for markdown
"<!--@generated-->"
seemed idiomatic.The text was updated successfully, but these errors were encountered: