Integrate source version checks for main inputs

This commit is contained in:
2026-10-15 15:24:53 +00:00
parent 49218a836b
commit 23ae700194
8 changed files with 337 additions and 29 deletions

View File

@@ -41,6 +41,21 @@ type sourceVersionProcessingResult struct {
diagnostics []Diagnostic
}
func effectiveSourceVersionRule(local *VersionRule, destination Path, mode sourceVersionMode) *VersionRule {
if local == nil {
return nil
}
if mode == sourceVersionModeDefault {
return local
}
effective := *local
effective.Path = Path{
segments: append(clonePathSegments(destination.segments, len(local.Path.segments)), local.Path.segments...),
invalid: destination.invalid || local.Path.invalid,
}
return &effective
}
type sourceVersionPathAbsence uint8
const (