@@ -92,8 +92,10 @@ def main():
92
92
93
93
@main .command ()
94
94
@click .argument ("file_path" )
95
+ @click .option ("--warn" , "-w" , multiple = True )
96
+ @click .option ("--skip" , "-s" , multiple = True )
95
97
@click .option ("--verbose" , "-v" , count = True , help = "Print performed checks to stdout." )
96
- def check (file_path , verbose ):
98
+ def check (file_path , warn , skip , verbose ):
97
99
"""Lint and validate a (yml or tsv) metadata block file.
98
100
99
101
Loads the input file and performs a series of checks defined in the rules.py module.
@@ -106,7 +108,7 @@ def check(file_path, verbose):
106
108
are also performed.
107
109
"""
108
110
lint_violations = ViolationsByFile ()
109
- lint_conf = LintConfig ( )
111
+ lint_conf = LintConfig . from_cli_args ( warn , skip )
110
112
111
113
if verbose :
112
114
print (f"Checking input file: { file_path } \n \n " )
@@ -146,6 +148,8 @@ def check(file_path, verbose):
146
148
@main .command ()
147
149
@click .argument ("file_path" )
148
150
@click .option ("--verbose" , "-v" , count = True , help = "Print performed checks to stdout." )
151
+ @click .option ("--warn" , "-w" , multiple = True )
152
+ @click .option ("--skip" , "-s" , multiple = True )
149
153
@click .option (
150
154
"--outfile" , "-o" , nargs = 1 , help = "Path to where the output file will be written."
151
155
)
@@ -170,7 +174,7 @@ def convert(file_path, verbose, outfile):
170
174
print (f"Checking input file: { file_path } \n \n " )
171
175
172
176
lint_violations = ViolationsByFile ()
173
- lint_conf = LintConfig ( )
177
+ lint_conf = LintConfig . from_cli_args ( warn , skip )
174
178
175
179
input_type , file_ext_violations = guess_input_type (file_path )
176
180
lint_violations .extend_for (file_path , file_ext_violations )
0 commit comments