@@ -216,6 +216,42 @@ def _display_disclaimer() -> None:
216216 click .secho ()
217217
218218
219+ def _display_validation_summary (results : List [Dict [str , Any ]]) -> None :
220+ """Display a summary of validation results.
221+
222+ Args:
223+ results: List of validation result dictionaries
224+ """
225+ passed = 0
226+ failed = []
227+ all_paths = []
228+
229+ for result in results :
230+ path = result .get ("path" , "unknown" )
231+ all_paths .append (path )
232+ if result .get ("valid_stac" ):
233+ passed += 1
234+ else :
235+ failed .append (path )
236+
237+ click .secho ("\n " + "=" * 50 )
238+ click .secho ("VALIDATION SUMMARY" , bold = True )
239+ click .secho (f"Total assets checked: { len (all_paths )} " )
240+ click .secho (f"✅ Passed: { passed } " )
241+
242+ if failed :
243+ click .secho (f"❌ Failed: { len (failed )} " , fg = "red" )
244+ click .secho ("\n Failed Assets:" , fg = "red" )
245+ for path in failed :
246+ click .secho (f" - { path } " )
247+
248+ click .secho ("\n All Assets Checked:" )
249+ for path in all_paths :
250+ click .secho (f" - { path } " )
251+
252+ click .secho ("\n " + "=" * 50 )
253+
254+
219255def _display_validation_results (
220256 results : List [Dict [str , Any ]],
221257 title : str ,
@@ -253,7 +289,6 @@ def _display_validation_results(
253289 click .secho (f"{ key } = { value } " )
254290
255291 click .secho ("-------------------------" )
256-
257292 for count , msg in enumerate (results ):
258293 # Get the path or use a fallback
259294 path = msg .get ("path" , f"(unknown-{ count + 1 } )" )
@@ -265,14 +300,18 @@ def _display_validation_results(
265300 if create_linter_func :
266301 item_linter = create_linter_func (msg )
267302
268- # Set validation status and error info for invalid items
269- if not msg .get ("valid_stac" , True ):
270- item_linter .valid_stac = False
271- item_linter .error_type = msg .get ("error_type" )
272- item_linter .error_msg = msg .get ("error_message" )
273-
274- # Display using the provided message function
275- cli_message_func (item_linter )
303+ # If create_linter_func returns None (for recursive validation), use fallback
304+ if item_linter is None :
305+ _display_fallback_message (msg )
306+ else :
307+ # Set validation status and error info for invalid items
308+ if not msg .get ("valid_stac" , True ):
309+ item_linter .valid_stac = False
310+ item_linter .error_type = msg .get ("error_type" )
311+ item_linter .error_msg = msg .get ("error_message" )
312+
313+ # Display using the provided message function
314+ cli_message_func (item_linter )
276315 else :
277316 # No linter creation function provided, use fallback
278317 _display_fallback_message (msg )
@@ -282,6 +321,9 @@ def _display_validation_results(
282321
283322 click .secho ("-------------------------" )
284323
324+ # Display summary at the end for better visibility with many items
325+ _display_validation_summary (results )
326+
285327
286328def item_collection_message (
287329 linter : ApiLinter ,
0 commit comments