Reuse default import patterns
This commit is contained in:
@@ -187,6 +187,8 @@ basis for the analysis.
|
||||
|
||||
## Finding 6 — Skipped directory imports copy shared patterns per declaration
|
||||
|
||||
**Status** — Complete. Inherited directory policies borrow the read-only load snapshot. Import selection and no-base tests passed.
|
||||
|
||||
**Priority P3.** With no base, `acquireContextlessInput` calls
|
||||
`prepareImportDeclarations`, which holds one full resolved policy per
|
||||
declaration. Each directory declaration that inherits the load-wide
|
||||
|
||||
@@ -124,7 +124,8 @@ func resolveImportPolicy(spec importDeclarationSpec, defaults ImportDefaults) (r
|
||||
if spec.patternSet {
|
||||
policy.pattern = cloneStrings(spec.pattern)
|
||||
} else {
|
||||
policy.pattern = cloneStrings(defaults.Pattern)
|
||||
// Defaults belong to the load's snapshot. Selectors only read them.
|
||||
policy.pattern = defaults.Pattern
|
||||
}
|
||||
}
|
||||
if spec.depthSet && !policy.recursive {
|
||||
|
||||
Reference in New Issue
Block a user