Skip to content
Discussion options

You must be logged in to vote

Short answer: No — GitHub does not currently allow searching code that it classifies as “generated”, and this behavior cannot be overridden at the organization or repository level.

Why this happens

GitHub automatically detects generated files using well-known comment patterns such as:

// Code generated by mygenerator 0.0.2-b DO NOT EDIT

Once a file is classified as generated, GitHub:

  • Excludes it from code search indexing
  • Excludes it from code navigation
  • Does this globally and automatically

This is intentional and there is no opt-in flag to force indexing of generated files.


Is there a way to flag generated files to still be indexed?

No.
GitHub does not provide:

  • An org-level setting
  • A…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zeroflucs-adam-bishop
Comment options

Answer selected by zeroflucs-adam-bishop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Search and Navigation Search, navigate, and understand code on GitHub Question Ask and answer questions about GitHub features and usage
2 participants