更新 linter,修复测试文档上的内容

This commit is contained in:
锦恢 2024-12-23 20:03:32 +08:00
parent 95632ace63
commit b52e34bd90
3 changed files with 11 additions and 6 deletions

View File

@ -78,4 +78,5 @@ pub fn goto_vhdl_definition(server: &LspServer, params: &GotoDefinitionParams) -
// def.url(),
// Range::new(def_pos, def_pos),
// )))
}
}

View File

@ -63,31 +63,31 @@ pub fn provide_diagnostics(
// 外层代码需要保证只有一个 linter.enable 为 true
match linter_configuration {
config if config.iverilog.linter.enabled => {
info!("iverilog linter enter");
// info!("iverilog linter enter");
if let Some(diag) = &mut config.iverilog.provide_diagnostics(&uri, rope, server) {
diagnostics.append(diag);
}
}
config if config.verilator.linter.enabled => {
info!("verilator linter enter");
// info!("verilator linter enter");
if let Some(diag) = &mut config.verilator.provide_diagnostics(&uri, rope, server) {
diagnostics.append(diag);
}
}
config if config.verible.linter.enabled => {
info!("verible linter enter");
// info!("verible linter enter");
if let Some(diag) = &mut config.verible.provide_diagnostics(&uri, rope, server) {
diagnostics.append(diag);
}
}
config if config.modelsim.linter.enabled => {
info!("modelsim linter enter");
// info!("modelsim linter enter");
if let Some(diag) = &mut config.modelsim.provide_diagnostics(&uri, rope, server) {
diagnostics.append(diag);
}
}
config if config.vivado.linter.enabled => {
info!("vivado linter enter");
// info!("vivado linter enter");
if let Some(diag) = &mut config.vivado.provide_diagnostics(&uri, rope, server) {
diagnostics.append(diag);
}

View File

@ -112,6 +112,10 @@ impl AbstractLinterConfiguration for VivadoConfiguration {
start: Position { line: error_no as u32, character: start_char as u32 },
end: Position { line: error_no as u32, character: end_char as u32 }
};
if error_description.contains("due to previous errors") {
continue;
}
let diagnostic = Diagnostic {
range,