mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Expose TRAP compression option via the new extractor options feature.
This commit is contained in:
committed by
Harry Maclean
parent
348165205c
commit
7649772935
@@ -11,8 +11,17 @@ file_types:
|
||||
- name: ruby
|
||||
display_name: Ruby files
|
||||
extensions:
|
||||
- .rb
|
||||
- .rb
|
||||
- name: erb
|
||||
display_name: Ruby templates
|
||||
extensions:
|
||||
- .erb
|
||||
- .erb
|
||||
options:
|
||||
trap_compression:
|
||||
title: Controls compression for the TRAP files written by the extractor.
|
||||
description: >
|
||||
This option is only intended for use in debugging the extractor. Accepted
|
||||
values are 'gzip' (the default, to write gzip-compressed TRAP) and 'none'
|
||||
(to write uncompressed TRAP).
|
||||
type: string
|
||||
pattern: "^(none|gzip)$"
|
||||
|
||||
@@ -92,18 +92,19 @@ fn main() -> std::io::Result<()> {
|
||||
"threads"
|
||||
}
|
||||
);
|
||||
let trap_compression = match trap::Compression::from_env("CODEQL_RUBY_TRAP_COMPRESSION") {
|
||||
Ok(x) => x,
|
||||
Err(e) => {
|
||||
main_thread_logger.write(
|
||||
main_thread_logger
|
||||
.new_entry("configuration-error", "Configuration error")
|
||||
.message("{}; using gzip.", &[diagnostics::MessageArg::Code(&e)])
|
||||
.severity(diagnostics::Severity::Warning),
|
||||
);
|
||||
trap::Compression::Gzip
|
||||
}
|
||||
};
|
||||
let trap_compression =
|
||||
match trap::Compression::from_env("CODEQL_EXTRACTOR_RUBY_OPTION_TRAP_COMPRESSION") {
|
||||
Ok(x) => x,
|
||||
Err(e) => {
|
||||
main_thread_logger.write(
|
||||
main_thread_logger
|
||||
.new_entry("configuration-error", "Configuration error")
|
||||
.message("{}; using gzip.", &[diagnostics::MessageArg::Code(&e)])
|
||||
.severity(diagnostics::Severity::Warning),
|
||||
);
|
||||
trap::Compression::Gzip
|
||||
}
|
||||
};
|
||||
drop(main_thread_logger);
|
||||
rayon::ThreadPoolBuilder::new()
|
||||
.num_threads(num_threads)
|
||||
|
||||
Reference in New Issue
Block a user