Integrate source version checks for main inputs
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user