Skip to content

Commit

Permalink
Comment that lint_configuration.md is machine generated
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerjw committed Jan 14, 2023
1 parent d950279 commit c0da8ac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions book/src/lint_configuration.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
This file is generated by `cargo collect-metadata`.
Please use that command to update the file and do not edit it by hand.
-->

## Lint Configuration Options
| <div style="width:290px">Option</div> | Default Value |
|--|--|
Expand Down
12 changes: 11 additions & 1 deletion clippy_lints/src/utils/internal_lints/metadata_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,17 @@ impl Drop for MetadataCollector {
.create(true)
.open(MARKDOWN_OUTPUT_FILE)
.unwrap();
writeln!(file, "{}", self.get_markdown_docs(),).unwrap();
writeln!(
file,
"<!--
This file is generated by `cargo collect-metadata`.
Please use that command to update the file and do not edit it by hand.
-->
{}",
self.get_markdown_docs(),
)
.unwrap();
}
}

Expand Down

0 comments on commit c0da8ac

Please sign in to comment.