From ea46afea87e80579b8852bd19d2af67831b76325 Mon Sep 17 00:00:00 2001 From: Lynx <141365347+iLynxcat@users.noreply.github.com> Date: Tue, 9 Jul 2024 21:27:17 -0500 Subject: [PATCH] Revamp `.gitattributes` for statistics and better PR diffs (#2596) * Revamp .gitattributes for statistics and better PR diffs * Mark migration_lock as binary --- .gitattributes | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index 619c2fe74..b934c8507 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,20 @@ -pnpm-lock.yaml -diff -package-lock.json -diff -Cargo.lock -diff -.github/actions/publish-artifacts/dist/index.js -diff +# Mark generated lockfiles as generated code +Cargo.lock -diff linguist-generated +pnpm-lock.yaml -diff linguist-generated + +# Mark our codegen as generated code +/.github/actions/publish-artifacts/dist/index.js -diff linguist-generated +/apps/desktop/src/commands.ts linguist-generated +/core/prisma/migrations/migration_lock.toml -diff linguist-generated +/crates/sync/example/web/src/utils/bindings.ts linguist-generated +/packages/assets/**/index.ts linguist-generated +/packages/client/src/core.ts linguist-generated + +# Mark copied-in code as vendored, removing from language statistics +/apps/landing/src/plugins/rehype-image-size.js linguist-vendored + +# Mark docs and examples as documentation, removing them from language statistics +/apps/landing/posts/* linguist-documentation +/docs/* linguist-documentation +/crates/*/example/**/* linguist-documentation +/crates/*/examples/**/* linguist-documentation