mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
Merge pull request #13055 from hmac/tree-sitter-extractor-clippy-fixes
Shared: Fix clippy in shared extractor
This commit is contained in:
@@ -43,4 +43,4 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Run clippy
|
||||
run: cargo clippy -- --no-deps # -D warnings
|
||||
run: cargo clippy -- --no-deps -D warnings -A clippy::new_without_default -A clippy::too_many_arguments
|
||||
|
||||
7
shared/tree-sitter-extractor/rust-toolchain.toml
Normal file
7
shared/tree-sitter-extractor/rust-toolchain.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
# This file specifies the Rust version used to develop and test the shared
|
||||
# extractor. It is set to the lowest version of Rust we want to support.
|
||||
|
||||
[toolchain]
|
||||
channel = "1.68"
|
||||
profile = "minimal"
|
||||
components = [ "clippy", "rustfmt" ]
|
||||
@@ -62,7 +62,7 @@ impl Extractor {
|
||||
main_thread_logger.write(
|
||||
main_thread_logger
|
||||
.new_entry("configuration-error", "Configuration error")
|
||||
.message("{}; using gzip.", &[diagnostics::MessageArg::Code(&e)])
|
||||
.message("{}; using gzip.", &[diagnostics::MessageArg::Code(e)])
|
||||
.severity(diagnostics::Severity::Warning),
|
||||
);
|
||||
trap::Compression::Gzip
|
||||
|
||||
@@ -83,10 +83,7 @@ pub enum Storage {
|
||||
|
||||
impl Storage {
|
||||
pub fn is_column(&self) -> bool {
|
||||
match self {
|
||||
Storage::Column { .. } => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(self, Storage::Column { .. })
|
||||
}
|
||||
}
|
||||
pub fn read_node_types(prefix: &str, node_types_path: &Path) -> std::io::Result<NodeTypeMap> {
|
||||
|
||||
Reference in New Issue
Block a user