11#!/bin/python3
22
3- # © 2024 Nokia
3+ # © 2024-2025 Nokia
44# Authors: Gergely Csatári, Marc-Etienne Vargenau
55# Licensed under the Apache License 2.0
66# SPDX-License-Identifier: Apache-2.0
@@ -43,6 +43,9 @@ def main():
4343 filePath = str (args .input )
4444 validator = Validator ()
4545
46+ if args .recursive :
47+ args .reference_logic = "checksum-all"
48+
4649 reference_logic = args .reference_logic
4750 if None == args .reference_logic :
4851 reference_logic = "none"
@@ -88,7 +91,8 @@ def parseArguments(additionalArguments: AdditionalArguments = AdditionalArgument
8891 parser .add_argument ('input' ,
8992 help = 'The input SPDX file.' ,
9093 nargs = "?" )
91- parser .add_argument ('--version' , action = "store_true" ,
94+
95+ parser .add_argument ('-v' , '--version' , action = "store_true" ,
9296 help = 'Prints version and exits.' ,
9397 required = False )
9498 parser .add_argument ('--debug' , action = "store_true" ,
@@ -106,6 +110,8 @@ def parseArguments(additionalArguments: AdditionalArguments = AdditionalArgument
106110 ' The default behaviour is to run a non-strict URL check, meaning that'
107111 ' it is not checked if the URL points to a valid page. Strict URL check'
108112 ' requires access to the internet and takes some time.' )
113+ parser .add_argument ('-r' , '--recursive' , action = "store_true" ,
114+ help = 'Validate recursively. Same as “--reference-logic checksum-all”.' )
109115 parser .add_argument ('--reference-logic' ,
110116 help = 'Defines the logic how the referenced files are accessible. If not'
111117 ' added, the referenced files will not be investigated.'
0 commit comments