Skip to content

Commit

Permalink
Merge pull request #43 from yubing744/feature-ignore-script-warn
Browse files Browse the repository at this point in the history
feat: test skip public(script) warning
  • Loading branch information
yubing744 authored Oct 27, 2022
2 parents a185520 + ad3d99f commit a7ae4d7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
6 changes: 3 additions & 3 deletions language/move-analyzer/editors/code/tests/lsp-demo/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "Symbols"
version = "0.0.1"

[dependencies]
MoveStdlib = { local = "../../../../../../move-stdlib/", addr_subst = { "std" = "0x1" } }

[addresses]
Symbols = "0xCAFE"

[dependencies]
StarcoinFramework = {git = "https://github.com/starcoinorg/starcoin-framework.git", rev="cf1deda180af40a8b3e26c0c7b548c4c290cd7e7"}
17 changes: 16 additions & 1 deletion language/move-analyzer/src/symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,22 @@ impl Symbolicator {
// start with empty diagnostics for all files and replace them with actual diagnostics
// only for files that have failures/warnings so that diagnostics for all other files
// (that no longer have failures/warnings) are reset
ide_diagnostics.extend(lsp_diagnostics);
for (key, value) in lsp_diagnostics {
let mut diags:Vec<Diagnostic> = vec![];

for diag in value {
if diag.message.contains("'public(script)' is deprecated") { // skip public(script) warning for starcoin chain
continue;
}

diags.push(diag);
}

if diags.len() > 0 {
ide_diagnostics.insert(key, diags);
}
}

if failure {
// just return diagnostics as we don't have typed AST that we can use to compute
// symbolication information
Expand Down

0 comments on commit a7ae4d7

Please sign in to comment.