.gitattributes 2.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # 保持脚本文件 LF 换行,避免 Windows CRLF 导致 shebang 解析失败
  2. *.mjs text eol=lf
  3. *.sh text eol=lf
  4. # schema baseline 与运行时 dump 逐字节比对;Windows autocrlf 检出成 CRLF 会被
  5. # db:schema:check 误报为 schema 差异并阻断 pre-push,强制 LF。
  6. *.baseline.sql text eol=lf
  7. # Python 锁文件由 recipe 按 SHA-256 固定;Windows autocrlf 检出成 CRLF 后,
  8. # 资源转换会报 lock digest differs,强制 LF。
  9. scripts/preinstalled-tools/python/locks/*.txt text eol=lf
  10. # E2E PDF fixture 含规范 xref 尾空格,必须按二进制处理,避免 diff --check 误报。
  11. packages/desktop/test/e2e/fixtures/fs/**/*.pdf binary
  12. # 文档查看器测试 PDF 同理:按字节解析 xref,换行转换会破坏偏移。
  13. apps/zcode-cli/packages/office-runtime/fixtures/*.pdf binary
  14. # 上游许可原文与生成的声明按字节保存,不能自动转换换行或裁剪空白。
  15. # 原文中的 License / ======= 是 Markdown 标题,不是合并冲突。
  16. THIRD-PARTY-NOTICES.md -text -whitespace conflict-marker-size=32 linguist-generated=true
  17. third-party/upstream/** -text -whitespace
  18. third-party/native-search/licenses/** -text -whitespace
  19. third-party/runtime/*.txt -text -whitespace
  20. docs/knip/docs/LICENSE -text -whitespace
  21. docs/knip/docs/licenses/** -text -whitespace
  22. third-party/inventory.json linguist-generated=true
  23. # Gen UI vendor 快照带 sha256 清单,构建时逐字节校验;autocrlf 改写换行会误报漂移,按字节保真。
  24. apps/zcode-cli/packages/visualize-plugin/skills/visualize/assets/vendor/** -text
  25. # design 内置插件:第三方设计资源保持上游原字节(许可登记按原文哈希校验);
  26. # SessionStart hook 是 sh/cmd 双写法脚本,CRLF 会让 sh 解析失败,固定 LF。
  27. apps/zcode-cli/packages/design-plugin/skills/design/design-resources/** -text -whitespace linguist-vendored=true
  28. apps/zcode-cli/packages/design-plugin/hooks/design-rules text eol=lf
  29. apps/zcode-cli/packages/design-plugin/hooks/run-hook.cmd text eol=lf