File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4747 hooks :
4848 - id : docs-mdx-validate
4949 name : Validate generated MDX docs
50- entry : bash -c 'test -d docs/docs/api && uv run --no-sync python tooling/docs-autogen/validate.py docs/docs/api --skip-coverage || true'
50+ entry : bash -c 'test -d docs/docs/api && uv run --no-sync python tooling/docs-autogen/validate.py docs/docs/api --skip-coverage --warn-only || true'
5151 language : system
5252 pass_filenames : false
5353 files : (docs/docs/.*\.mdx$|tooling/docs-autogen/)
Original file line number Diff line number Diff line change @@ -735,6 +735,11 @@ def main():
735735 "--docs-root" ,
736736 help = "Root docs/ directory for stale-file checks (default: parent of docs_dir)" ,
737737 )
738+ parser .add_argument (
739+ "--warn-only" ,
740+ action = "store_true" ,
741+ help = "Print issues but always exit 0 (pre-commit informational mode)" ,
742+ )
738743 args = parser .parse_args ()
739744
740745 docs_dir = Path (args .docs_dir )
@@ -871,7 +876,7 @@ def main():
871876 output_path .write_text (json .dumps (report , indent = 2 ))
872877 print (f"\n 📄 Report saved to { output_path } " )
873878
874- sys .exit (0 if report ["overall_passed" ] else 1 )
879+ sys .exit (0 if ( report ["overall_passed" ] or args . warn_only ) else 1 )
875880
876881
877882if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments