Tree-sitter: Respect verbosity defined in CODEQL_VERBOSITY

This commit is contained in:
Tom Hvitved
2024-05-08 15:38:44 +02:00
parent a523be4d0a
commit e4cd9d86f6
12 changed files with 706 additions and 3076 deletions

BIN
ql/Cargo.lock generated

Binary file not shown.

View File

@@ -20,12 +20,7 @@ pub struct Options {
}
pub fn run(options: Options) -> std::io::Result<()> {
tracing_subscriber::fmt()
.with_target(false)
.without_time()
.with_level(true)
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
.init();
codeql_extractor::extractor::set_tracing_level("ql");
let extractor = simple::Extractor {
prefix: "ql".to_string(),

View File

@@ -15,12 +15,7 @@ pub struct Options {
}
pub fn run(options: Options) -> std::io::Result<()> {
tracing_subscriber::fmt()
.with_target(false)
.without_time()
.with_level(true)
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
.init();
codeql_extractor::extractor::set_tracing_level("ql");
let languages = vec![
Language {

View File

@@ -2,6 +2,6 @@
# extractor. It is set to the lowest version of Rust we want to support.
[toolchain]
channel = "1.70"
channel = "1.74"
profile = "minimal"
components = [ "rustfmt" ]

Binary file not shown.

View File

@@ -34,7 +34,7 @@ lazy_static = "1.4.0"
# of lock-file update time, but `rules_rust` pins generates a bazel rule that unconditionally downloads `main`, which
# breaks build hermeticity. So, rev-pinning it is.
# See also https://github.com/bazelbuild/rules_rust/issues/2502.
codeql-extractor = { git = "https://github.com/github/codeql.git", rev = "bc1283c7152b0bb4d27ff6a004869f493e93d2b3" }
codeql-extractor = { git = "https://github.com/github/codeql.git", rev = "a523be4d0a1e2420a1884f7c4f8754a7c4fb7e21" }
[patch.crates-io]
tree-sitter = {git = "https://github.com/redsun82/tree-sitter.git", rev = "1f5c1112ceaa8fc6aff61d1852690407670d2a96"}

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,6 @@
# extractor. It is set to the lowest version of Rust we want to support.
[toolchain]
channel = "1.70"
channel = "1.74"
profile = "minimal"
components = [ "rustfmt" ]

View File

@@ -25,15 +25,7 @@ pub struct Options {
}
pub fn run(options: Options) -> std::io::Result<()> {
tracing_subscriber::fmt()
.with_target(false)
.without_time()
.with_level(true)
.with_env_filter(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("ruby_extractor=warn")),
)
.init();
extractor::set_tracing_level("ruby");
let diagnostics = diagnostics::DiagnosticLoggers::new("ruby");
let mut main_thread_logger = diagnostics.logger();
let num_threads = match codeql_extractor::options::num_threads() {

View File

@@ -15,12 +15,7 @@ pub struct Options {
}
pub fn run(options: Options) -> std::io::Result<()> {
tracing_subscriber::fmt()
.with_target(false)
.without_time()
.with_level(true)
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
.init();
codeql_extractor::extractor::set_tracing_level("ruby");
let languages = vec![
Language {

View File

@@ -2,6 +2,6 @@
# extractor. It is set to the lowest version of Rust we want to support.
[toolchain]
channel = "1.70"
channel = "1.74"
profile = "minimal"
components = [ "clippy", "rustfmt" ]

View File

@@ -14,7 +14,7 @@ pub mod simple;
/// Sets the tracing level based on the environment variables
/// `RUST_LOG` and `CODEQL_VERBOSITY` (prioritized in that order),
/// falling back to `warn` if neither is set.
pub fn set_tracing_level(language: &str) -> () {
pub fn set_tracing_level(language: &str) {
tracing_subscriber::fmt()
.with_target(false)
.without_time()