File tree Expand file tree Collapse file tree 2 files changed +28
-14
lines changed Expand file tree Collapse file tree 2 files changed +28
-14
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,21 @@ file_types:
11
11
- name : ruby
12
12
display_name : Ruby files
13
13
extensions :
14
- - .rb
14
+ - .rb
15
15
- name : erb
16
16
display_name : Ruby templates
17
17
extensions :
18
- - .erb
18
+ - .erb
19
+ options :
20
+ trap :
21
+ title : Options pertaining to TRAP.
22
+ type : object
23
+ properties :
24
+ compression :
25
+ title : Controls compression for the TRAP files written by the extractor.
26
+ description : >
27
+ This option is only intended for use in debugging the extractor. Accepted
28
+ values are 'gzip' (the default, to write gzip-compressed TRAP) and 'none'
29
+ (to write uncompressed TRAP).
30
+ type : string
31
+ pattern : " ^(none|gzip)$"
Original file line number Diff line number Diff line change @@ -92,18 +92,19 @@ fn main() -> std::io::Result<()> {
92
92
"threads"
93
93
}
94
94
) ;
95
- let trap_compression = match trap:: Compression :: from_env ( "CODEQL_RUBY_TRAP_COMPRESSION" ) {
96
- Ok ( x) => x,
97
- Err ( e) => {
98
- main_thread_logger. write (
99
- main_thread_logger
100
- . new_entry ( "configuration-error" , "Configuration error" )
101
- . message ( "{}; using gzip." , & [ diagnostics:: MessageArg :: Code ( & e) ] )
102
- . severity ( diagnostics:: Severity :: Warning ) ,
103
- ) ;
104
- trap:: Compression :: Gzip
105
- }
106
- } ;
95
+ let trap_compression =
96
+ match trap:: Compression :: from_env ( "CODEQL_EXTRACTOR_RUBY_OPTION_TRAP_COMPRESSION" ) {
97
+ Ok ( x) => x,
98
+ Err ( e) => {
99
+ main_thread_logger. write (
100
+ main_thread_logger
101
+ . new_entry ( "configuration-error" , "Configuration error" )
102
+ . message ( "{}; using gzip." , & [ diagnostics:: MessageArg :: Code ( & e) ] )
103
+ . severity ( diagnostics:: Severity :: Warning ) ,
104
+ ) ;
105
+ trap:: Compression :: Gzip
106
+ }
107
+ } ;
107
108
drop ( main_thread_logger) ;
108
109
rayon:: ThreadPoolBuilder :: new ( )
109
110
. num_threads ( num_threads)
You can’t perform that action at this time.
0 commit comments