Tree-sitter: Respect verbosity defined in `CODEQL_VERBOSITY`

This commit is contained in:
Tom Hvitved 2024-05-08 15:38:44 +02:00
Родитель a523be4d0a
Коммит e4cd9d86f6
12 изменённых файлов: 901 добавлений и 3566 удалений

1
ql/Cargo.lock сгенерированный
Просмотреть файл

@ -203,6 +203,7 @@ dependencies = [
"serde",
"serde_json",
"tracing",
"tracing-subscriber",
"tree-sitter",
]

Просмотреть файл

@ -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(),

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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" ]

684
ruby/extractor/Cargo.lock сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -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"}

3741
ruby/extractor/cargo-bazel-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -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" ]

Просмотреть файл

@ -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() {

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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" ]

Просмотреть файл

@ -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()