()
| 328 | func (e *blastRadiusDiffError) Unwrap() error { return e.err } |
| 329 | |
| 330 | func defaultBlastRadiusLimits() blastRadiusLimits { |
| 331 | return blastRadiusLimits{ |
| 332 | MaxTotalChars: envInt("CODEMAP_BLAST_MAX_TOTAL_CHARS", 24000), |
| 333 | MaxChangedFiles: envInt("CODEMAP_BLAST_MAX_CHANGED_FILES", 20), |
| 334 | MaxAffected: envInt("CODEMAP_BLAST_MAX_AFFECTED", 12), |
| 335 | MaxContext: envInt("CODEMAP_BLAST_MAX_CONTEXT", 8), |
| 336 | MaxSnippets: envInt("CODEMAP_BLAST_MAX_SNIPPETS", 8), |
| 337 | MaxSnippetsPerChanged: envInt("CODEMAP_BLAST_MAX_SNIPPETS_PER_CHANGED", 2), |
| 338 | SnippetRadius: envInt("CODEMAP_BLAST_SNIPPET_RADIUS", 2), |
| 339 | MaxSnippetChars: envInt("CODEMAP_BLAST_MAX_SNIPPET_CHARS", 700), |
| 340 | MaxDiffChars: envInt("CODEMAP_BLAST_MAX_DIFF_CHARS", 8000), |
| 341 | MaxDepsChars: envInt("CODEMAP_BLAST_MAX_DEPS_CHARS", 5000), |
| 342 | MaxImportersChars: envInt("CODEMAP_BLAST_MAX_IMPORTERS_CHARS", 6000), |
| 343 | MaxImporterFiles: envInt("CODEMAP_BLAST_MAX_IMPORTER_FILES", 8), |
| 344 | MaxImportersPerFile: envInt("CODEMAP_BLAST_MAX_IMPORTERS_PER_FILE", 12), |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | func envInt(key string, fallback int) int { |
| 349 | raw := strings.TrimSpace(os.Getenv(key)) |
no test coverage detected