Skip to content

Commit 6219652

Browse files
janniklasroseTanishqDatabricks
authored andcommitted
Mark auto-generated files for GitHub linguist (databricks#5269)
## Changes Extend `linguist-generated=true` coverage so generated files don't pollute language stats or show up as hand-written code in review. Follows the existing convention of one local `.gitattributes` per generated folder (alongside `bundle/schema/`, `bundle/internal/tf/`, `bundle/internal/validation/generated/`, `acceptance/`, `integration/`). New / updated local files: | Generator | `.gitattributes` location | Pattern | |---|---|---| | `./task generate-direct` | `bundle/direct/dresources/` | `*.generated.yml` | | `./task generate-schema-docs` | `bundle/schema/` (extended) | `jsonschema_for_docs.json` | | `./task generate-schema` | `bundle/internal/schema/` | `annotations_openapi.yml` | | `./task generate-docs` | `bundle/docsgen/output/` | `*.md` | | `mockery` | `internal/mocks/` | `*.go` | | `./task pydabs-codegen` | `python/databricks/bundles/` | `{catalogs,jobs,pipelines,schemas,volumes}/**` | Excluded by request from review: - `internal/genkit/tagging.py{,.lock}` and `.github/workflows/tagging.yml` — kept visible because changes there can affect the release process (@andrewnester). - `acceptance/**/out*` and `acceptance/**/output/**` — kept visible because acceptance-output diffs are how reviewers detect behavior changes (@pietern, @andrewnester). ## Why `bundle/direct/dresources/apitypes.generated.yml` (and `resources.generated.yml`) were showing up as human-authored code on GitHub. The genkit-managed section of the root `.gitattributes` only covers `cmd/account/**` and `cmd/workspace/**`, so the rest of the auto-generated tree was unmarked. This brings linguist's view in line with `.agent/rules/auto-generated-files.md`. ## Tests Verified each pattern with `git check-attr linguist-generated <path>`: - Intended generated files resolve to `true`. - Adjacent manually-maintained files stay `unspecified`: `bundle/direct/dresources/apitypes.yml`, `bundle/internal/schema/annotations.yml`, `bundle/internal/schema/annotations_openapi_overrides.yml`, `bundle/docsgen/{main.go,README.md}`, `bundle/schema/schema.go`, `internal/mocks/README.md`, `python/databricks/bundles/{__init__.py,build.py,core/**}`. - Pre-existing local `.gitattributes` files (TF schema, validation generated, `bundle/schema/jsonschema.json`, acceptance `out.test.toml`) still resolve correctly. `./task ws` passes. _This PR was written by Claude Code._
1 parent 138e254 commit 6219652

6 files changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.generated.yml linguist-generated=true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.md linguist-generated=true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
annotations_openapi.yml linguist-generated=true

bundle/schema/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
jsonschema.json linguist-generated=true
2+
jsonschema_for_docs.json linguist-generated=true

internal/mocks/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.go linguist-generated=true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
catalogs/** linguist-generated=true
2+
jobs/** linguist-generated=true
3+
pipelines/** linguist-generated=true
4+
schemas/** linguist-generated=true
5+
volumes/** linguist-generated=true

0 commit comments

Comments
 (0)