File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -851,12 +851,30 @@ def validate_description_files():
851
851
print ('To update, run:' )
852
852
print ()
853
853
854
- for p in sorted (descriptions_ids - docs_ids ):
855
- size = Path ('descriptions' , p + '.md' ).stat ().st_size
856
- print (f'rm descriptions/{ p } .md # size={ size } ' )
854
+ non_empty = set ()
855
+ empty = set ()
857
856
858
- for p in sorted (docs_ids - descriptions_ids ):
859
- print (f'touch descriptions/{ p } .md' )
857
+ for p in descriptions_ids - docs_ids :
858
+ size = Path ('descriptions' , p + '.md' ).stat ().st_size
859
+ if size > 0 :
860
+ non_empty .add (p )
861
+ else :
862
+ empty .add (p )
863
+
864
+ if non_empty :
865
+ print ('# Non-empty description files (!!!):' )
866
+ for p in sorted (non_empty ):
867
+ print (f'rm descriptions/{ p } .md' )
868
+
869
+ if empty :
870
+ print ('# Empty description files:' )
871
+ for p in sorted (empty ):
872
+ print (f'rm descriptions/{ p } .md' )
873
+
874
+ if docs_ids - descriptions_ids :
875
+ print ('# Missing description files:' )
876
+ for p in sorted (docs_ids - descriptions_ids ):
877
+ print (f'touch descriptions/{ p } .md' )
860
878
861
879
862
880
def main ():
You can’t perform that action at this time.
0 commit comments