mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
Ruby, Rust: add zstd compression option
This commit is contained in:
@@ -23,10 +23,10 @@ options:
|
||||
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' (to write gzip-compressed TRAP) and 'none'
|
||||
(currently the default, to write uncompressed TRAP).
|
||||
values are 'gzip' (the default, to write gzip-compressed TRAP) 'zstd' (to
|
||||
write Zstandard-compressed TRAP) and 'none' (to write uncompressed TRAP).
|
||||
type: string
|
||||
pattern: "^(none|gzip)$"
|
||||
pattern: "^(none|gzip|zstd)$"
|
||||
cargo_target_dir:
|
||||
title: Directory to use for cargo output files.
|
||||
description: >
|
||||
|
||||
@@ -29,6 +29,7 @@ pub enum Compression {
|
||||
#[default] // TODO make gzip default
|
||||
None,
|
||||
Gzip,
|
||||
Zstd,
|
||||
}
|
||||
|
||||
impl From<Compression> for trap::Compression {
|
||||
@@ -36,6 +37,7 @@ impl From<Compression> for trap::Compression {
|
||||
match val {
|
||||
Compression::None => Self::None,
|
||||
Compression::Gzip => Self::Gzip,
|
||||
Compression::Zstd => Self::Zstd,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ def test_do_not_print_env(codeql, rust, rust_edition, cargo, check_env_not_dumpe
|
||||
@pytest.mark.ql_test("steps.ql", expected=".cargo.expected")
|
||||
@pytest.mark.parametrize(("rust_edition", "compression", "suffix"), [
|
||||
pytest.param(2024, "gzip", ".gz", id="gzip"),
|
||||
pytest.param(2024, "zstd", ".zst", id="zstd"),
|
||||
])
|
||||
def test_compression(codeql, rust, rust_edition, compression, suffix, cargo, rust_check_diagnostics, cwd):
|
||||
codeql.database.create(cleanup=False, _env={
|
||||
|
||||
Reference in New Issue
Block a user