File tree Expand file tree Collapse file tree 1 file changed +22
-21
lines changed Expand file tree Collapse file tree 1 file changed +22
-21
lines changed Original file line number Diff line number Diff line change 2
2
import sys
3
3
4
4
import click # type: ignore
5
+ from stac_check .cli import cli_message as lint_message
6
+ from stac_check .lint import Linter
5
7
6
8
from .validate import StacValidate
7
9
8
- # from stac_check.lint import Linter
9
-
10
10
11
11
@click .command ()
12
12
@click .argument ("stac_file" )
@@ -63,27 +63,28 @@ def main(
63
63
):
64
64
65
65
if lint is True :
66
- pass
67
-
68
- stac = StacValidate (
69
- stac_file = stac_file ,
70
- recursive = recursive ,
71
- core = core ,
72
- links = links ,
73
- assets = assets ,
74
- extensions = extensions ,
75
- custom = custom ,
76
- verbose = verbose ,
77
- no_output = no_output ,
78
- log = log_file ,
79
- )
80
- stac .run ()
66
+ linter = Linter (stac_file , assets = True , links = True , recursive = False )
67
+ lint_message (linter )
68
+ else :
69
+ stac = StacValidate (
70
+ stac_file = stac_file ,
71
+ recursive = recursive ,
72
+ core = core ,
73
+ links = links ,
74
+ assets = assets ,
75
+ extensions = extensions ,
76
+ custom = custom ,
77
+ verbose = verbose ,
78
+ no_output = no_output ,
79
+ log = log_file ,
80
+ )
81
+ stac .run ()
81
82
82
- if no_output is False :
83
- click .echo (json .dumps (stac .message , indent = 4 ))
83
+ if no_output is False :
84
+ click .echo (json .dumps (stac .message , indent = 4 ))
84
85
85
- if recursive == - 2 and stac .message [0 ]["valid_stac" ] is False :
86
- sys .exit (1 )
86
+ if recursive == - 2 and stac .message [0 ]["valid_stac" ] is False :
87
+ sys .exit (1 )
87
88
88
89
89
90
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments