@@ -94,6 +94,7 @@ def print_version(ctx, param, value):
9494 if not value or ctx .resilient_parsing :
9595 return
9696 click .echo ('ScanCode version ' + scancode_config .__version__ )
97+ click .echo ('ScanCode Data-format version ' + scancode_config .__output_format_version__ )
9798 ctx .exit ()
9899
99100
@@ -249,6 +250,13 @@ def validate_depth(ctx, param, value):
249250 'the starting directory. Use 0 for no scan depth limit.' ,
250251 help_group = cliutils .CORE_GROUP , sort_order = 301 , cls = PluggableCommandLineOption )
251252
253+ @click .option ('--next-data-format' ,
254+ is_flag = True ,
255+ help = 'Output the next experimental data format, for JSON and YAML output.'
256+ 'See CHANGELOG for more details on the changes in this experimental data format.' ,
257+ help_group = cliutils .OUTPUT_GROUP , sort_order = 28 , cls = PluggableCommandLineOption )
258+
259+
252260@click .help_option ('-h' , '--help' ,
253261 help_group = cliutils .DOC_GROUP , sort_order = 10 , cls = PluggableCommandLineOption )
254262
@@ -337,6 +345,7 @@ def scancode(
337345 verbose ,
338346 max_depth ,
339347 from_json ,
348+ next_data_format ,
340349 timing ,
341350 max_in_memory ,
342351 test_mode ,
@@ -439,6 +448,7 @@ def scancode(
439448 quiet = quiet ,
440449 verbose = verbose ,
441450 max_depth = max_depth ,
451+ next_data_format = next_data_format ,
442452 timing = timing ,
443453 max_in_memory = max_in_memory ,
444454 test_mode = test_mode ,
@@ -474,6 +484,7 @@ def scancode(
474484def run_scan (
475485 input , # NOQA
476486 from_json = False ,
487+ next_data_format = False ,
477488 strip_root = False ,
478489 full_root = False ,
479490 max_in_memory = 10000 ,
@@ -580,6 +591,7 @@ def echo_func(*_args, **_kwargs):
580591 quiet = quiet ,
581592 verbose = verbose ,
582593 from_json = from_json ,
594+ next_data_format = next_data_format ,
583595 timing = timing ,
584596 max_in_memory = max_in_memory ,
585597 test_mode = test_mode ,
@@ -828,6 +840,7 @@ def echo_func(*_args, **_kwargs):
828840 cle .start_timestamp = start_timestamp
829841 cle .tool_name = 'scancode-toolkit'
830842 cle .tool_version = scancode_config .__version__
843+ cle .output_format_version = scancode_config .__output_format_version__
831844 cle .notice = notice
832845 cle .options = pretty_params or {}
833846
0 commit comments