@@ -37,6 +37,9 @@ def lint(feedstock_dir, use_container=None):
37
37
Dictionary mapping relative recipe path to its lints.
38
38
hints : dict
39
39
Dictionary mapping relative recipe path to its hints.
40
+ errors : dict
41
+ Dictionary mapping relative recipe path to whether an error occurred
42
+ while linting the recipe.
40
43
"""
41
44
if should_use_container (use_container = use_container ):
42
45
return _lint_containerized (feedstock_dir )
@@ -77,7 +80,7 @@ def _lint_containerized(feedstock_dir):
77
80
# in the container. So we remove the subdir we made before cleaning up.
78
81
shutil .rmtree (tmpdir )
79
82
80
- return data ["lints" ], data ["hints" ]
83
+ return data ["lints" ], data ["hints" ], data [ "errors" ]
81
84
82
85
83
86
#############################################################
@@ -97,19 +100,27 @@ def _lint_local(feedstock_dir):
97
100
98
101
lints = defaultdict (list )
99
102
hints = defaultdict (list )
103
+ errors = {}
100
104
101
105
for recipe in recipes :
102
106
recipe_dir = recipe .parent
103
107
rel_path = str (recipe .relative_to (feedstock_dir ))
104
108
105
- _lints , _hints = conda_smithy .lint_recipe .main (
106
- str (recipe_dir ), conda_forge = True , return_hints = True
107
- )
109
+ try :
110
+ _lints , _hints = conda_smithy .lint_recipe .main (
111
+ str (recipe_dir ), conda_forge = True , return_hints = True
112
+ )
113
+ _error = False
114
+ except Exception :
115
+ _lints = []
116
+ _hints = []
117
+ _error = True
108
118
109
119
lints [rel_path ] = _lints
110
120
hints [rel_path ] = _hints
121
+ errors [rel_path ] = _error
111
122
112
- return dict (lints ), dict (hints )
123
+ return dict (lints ), dict (hints ), errors
113
124
114
125
115
126
# end of code from conda-forge-webservices w/ modifications
0 commit comments