Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
merge: hotfix/linter-activation into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmemorygrinder committed Feb 22, 2024
2 parents 4df85ae + 63abed8 commit 97dbe7c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion toolchains/solidity/core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion toolchains/solidity/core/crates/linter-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "linter-server"
license = "GPL-3.0-or-later"
version = "0.2.2"
version = "0.2.3"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
10 changes: 4 additions & 6 deletions toolchains/solidity/core/crates/linter-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,14 @@ impl LanguageServer for Backend {
self.lint(params.text_document.uri, params.text_document.text);
}

fn did_change(&self, params: DidChangeTextDocumentParams) {
fn did_save(&self, params: DidSaveTextDocumentParams) {
self.connection.borrow_mut().log_message(
MessageType::INFO,
format!("file changed!: {:}", params.text_document.uri),
);

self.lint(
params.text_document.uri,
params.content_changes[0].text.clone(),
);
if let Some(text) = params.text {
self.lint(params.text_document.uri, text);
}
}

fn did_change_watched_files(&self, params: DidChangeWatchedFilesParams) {
Expand Down

0 comments on commit 97dbe7c

Please sign in to comment.