From 4a4b21263e7abc4a169f44004a3164af75105cf6 Mon Sep 17 00:00:00 2001 From: Morgante Pell Date: Tue, 7 Jan 2025 09:56:15 -0600 Subject: [PATCH] fix: switch clippy lint to direct usage (#599) --- .github/workflows/code-quality.yaml | 14 ++++++++++---- crates/language/src/lib.rs | 2 +- crates/language/src/target_language.rs | 2 +- crates/wasm-bindings/src/match_pattern.rs | 2 +- vendor/tree-sitter-gritql | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/code-quality.yaml b/.github/workflows/code-quality.yaml index 8456fc61e..a6b1c29bd 100644 --- a/.github/workflows/code-quality.yaml +++ b/.github/workflows/code-quality.yaml @@ -17,8 +17,14 @@ jobs: submodules: recursive - name: Install Protoc run: sudo apt-get install -y protobuf-compiler - - run: rustup component add clippy - - uses: actions-rs/clippy-check@v1 + - name: install Rust + uses: actions-rs/toolchain@v1 with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --workspace --features test_ci --exclude grit-wasm-bindings -- -D warnings + # If you update this, also update build.mjs + toolchain: nightly-2023-11-16 + override: true + - run: rustup component add clippy rustfmt + - name: lint + run: cargo clippy --features test_ci --exclude grit-wasm-bindings --workspace --locked -- -D warnings + - name: format + run: cargo fmt --all -- --check diff --git a/crates/language/src/lib.rs b/crates/language/src/lib.rs index ff751c24f..14979da39 100644 --- a/crates/language/src/lib.rs +++ b/crates/language/src/lib.rs @@ -58,6 +58,7 @@ macro_rules! use_marzano_delegate { pub mod csharp; pub mod css; +pub mod elixir; pub mod foreign_language; pub mod go; pub mod grit_parser; @@ -77,7 +78,6 @@ mod php_like; pub mod php_only; pub mod python; pub mod ruby; -pub mod elixir; pub mod rust; pub mod solidity; pub mod sourcemap; diff --git a/crates/language/src/target_language.rs b/crates/language/src/target_language.rs index ba7ddacc5..e490e7504 100644 --- a/crates/language/src/target_language.rs +++ b/crates/language/src/target_language.rs @@ -1,6 +1,7 @@ use crate::{ csharp::CSharp, css::Css, + elixir::Elixir, go::Go, grit_parser::MarzanoGritParser, hcl::Hcl, @@ -17,7 +18,6 @@ use crate::{ php_only::PhpOnly, python::Python, ruby::Ruby, - elixir::Elixir, rust::Rust, solidity::Solidity, sql::Sql, diff --git a/crates/wasm-bindings/src/match_pattern.rs b/crates/wasm-bindings/src/match_pattern.rs index 9cdb4909d..4bb95fa0a 100644 --- a/crates/wasm-bindings/src/match_pattern.rs +++ b/crates/wasm-bindings/src/match_pattern.rs @@ -475,7 +475,7 @@ fn pattern_language_to_path(lang: &PatternLanguage) -> anyhow::Result { PatternLanguage::Go => Ok("/tree-sitter-go.wasm"), PatternLanguage::Rust => Ok("/tree-sitter-rust.wasm"), PatternLanguage::Ruby => Ok("/tree-sitter-ruby.wasm"), - PatternLanguage::Elixir=> Ok("/tree-sitter-elixir.wasm"), + PatternLanguage::Elixir => Ok("/tree-sitter-elixir.wasm"), PatternLanguage::Solidity => Ok("/tree-sitter-solidity.wasm"), PatternLanguage::Hcl => Ok("/tree-sitter-hcl.wasm"), PatternLanguage::Yaml => Ok("/tree-sitter-yaml.wasm"), diff --git a/vendor/tree-sitter-gritql b/vendor/tree-sitter-gritql index 1d1062865..f9d98660b 160000 --- a/vendor/tree-sitter-gritql +++ b/vendor/tree-sitter-gritql @@ -1 +1 @@ -Subproject commit 1d106286502e5ec14a791896addbec456fb0dffb +Subproject commit f9d98660bd7ae78c9211cb52e295bcd6531a8121