Skip to content

RFC 201: Detect configuration from repo contents

Created by: efritz

This is part of RFC 201: Auto-indexer build configuration.

We'd like to continue to auto-index repositories that haven't been explicitly configured to go very wide in our zero-effort open-source code intelligence coverage. This requires doing better than searching for repositories with a go.mod in the root. We need to instead be able to heuristically detect how to index a repository.

Write code that will walk a repository root and determine the roots, types of indexer, and necessary arguments to index as much of the source code as we know how to index today. This should be available in a separate library (eventually) as we'll likely want to bundle this with src-cli in the future.

This code should take the place of the "has go.mod file" heuristic in the index scheduler. This should only be used when there is not an explicit configuration in the database or the repository.