[ty] Add warning that docs are autogenerated (#18270)

## Summary

This is a practice I followed on previous projects. Should hopefully
further help developers who want to update the documentation.

The big downside is that it's annoying to see this *as a user of the
documentation* if you don't open the Markdown file in the browser. But
I'd argue that those files don't really follow the original Markdown
spirit anyway with all the inline HTML.
This commit is contained in:
David Peter 2025-05-23 11:58:16 +02:00 committed by GitHub
parent 93ac0934dd
commit 6392dccd24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 15 additions and 0 deletions

View file

@ -56,6 +56,10 @@ fn generate_markdown() -> String {
let mut output = String::new();
let _ = writeln!(
&mut output,
"<!-- WARNING: This file is auto-generated (cargo dev generate-all). Edit the lint-declarations in 'crates/ty_python_semantic/src/types/diagnostic.rs' if you want to change anything here. -->\n"
);
let _ = writeln!(&mut output, "# Rules\n");
let mut lints: Vec<_> = registry.lints().iter().collect();