# Code Generated Files and Vendored Code Detection Status: public Confidence: medium (0.685) (verified) Last verified: 2026-06-03 Generation: ai_structured ## TL;DR Code agents should identify generated and vendored files before editing, reviewing, blaming, or counting source code. ## Core Explanation Generated files are usually produced by tools, schemas, compilers, or code generators. Vendored files are copied from another project or dependency. Both can distort search results, ownership signals, coverage reports, license scans, and review diffs. Agents should inspect `.gitattributes`, repository conventions, lockfiles, build directories, source maps, generator comments, and package metadata before editing these files. If a generated file is wrong, the right fix may be the source schema or generator, not the generated artifact. ## Source-Mapped Facts - GitHub documentation says .gitattributes can be used with linguist-generated to mark generated files. ([source](https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github)) - GitHub documentation says .gitattributes can be used with linguist-vendored to mark vendored files. ([source](https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github)) - Git documentation says gitattributes files define attributes for pathnames. ([source](https://git-scm.com/docs/gitattributes)) ## Further Reading - [GitHub Customizing Changed Files](https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github) - [Git gitattributes](https://git-scm.com/docs/gitattributes)