story 2-12-preview-partial-mode: implemented and reviewed via bmad-loop
This commit is contained in:
1 parent
d1ba0bd0e4
commit
ab35d67177
56 files changed
+5801
-376
No files matched your search
@@ -8,6 +8,7 @@ pub fn document_finding(code: &str, message: impl Into<String>) -> ImportFinding
|
||||
severity: ImportFindingSeverity::Warning,
|
||||
message: message.into(),
|
||||
operation_key: None,
|
||||
source_location: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +18,7 @@ pub fn document_blocker(code: &str, message: impl Into<String>) -> ImportFinding
|
||||
severity: ImportFindingSeverity::Error,
|
||||
message: message.into(),
|
||||
operation_key: None,
|
||||
source_location: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +32,7 @@ pub fn operation_finding(
|
||||
severity: ImportFindingSeverity::Warning,
|
||||
message: message.into(),
|
||||
operation_key: Some(operation_key.to_owned()),
|
||||
source_location: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +46,7 @@ pub fn operation_info(
|
||||
severity: ImportFindingSeverity::Info,
|
||||
message: message.into(),
|
||||
operation_key: Some(operation_key.to_owned()),
|
||||
source_location: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +129,7 @@ pub fn operation_recommendations(operation: &RestImportOperation) -> Vec<ImportF
|
||||
),
|
||||
));
|
||||
}
|
||||
findings
|
||||
with_operation_location(findings, operation)
|
||||
}
|
||||
|
||||
pub fn candidate_recommendations(
|
||||
@@ -179,6 +183,18 @@ pub fn candidate_recommendations(
|
||||
));
|
||||
}
|
||||
|
||||
with_operation_location(findings, operation)
|
||||
}
|
||||
|
||||
fn with_operation_location(
|
||||
mut findings: Vec<ImportFinding>,
|
||||
operation: &RestImportOperation,
|
||||
) -> Vec<ImportFinding> {
|
||||
for finding in &mut findings {
|
||||
if finding.source_location.is_none() {
|
||||
finding.source_location = operation.source_location.clone();
|
||||
}
|
||||
}
|
||||
findings
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user