Skip to content

Commit b7a9009

Browse files
committed
fix: docs
1 parent bfd1774 commit b7a9009

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

docs/codegen/src/rules_docs.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use std::{
1717
str::{self, FromStr},
1818
};
1919

20-
///
2120
/// Generates the documentation page for each lint rule.
2221
///
2322
/// * `docs_dir`: Path to the docs directory.
@@ -64,23 +63,24 @@ fn generate_rule_doc(
6463

6564
// add deprecation notice
6665
if let Some(reason) = &meta.deprecated {
67-
writeln!(content, ":::caution[Deprecated]")?;
68-
writeln!(content, "This rule is deprecated and will be removed in the next major release.\n**Reason**: {reason}")?;
69-
writeln!(content, ":::")?;
66+
writeln!(content, "> [!WARNING]")?;
67+
writeln!(content, "> This rule is deprecated and will be removed in the next major release.\n**Reason**: {reason}")?;
7068
}
7169

70+
writeln!(content)?;
7271
writeln!(content, "**Since**: `v{}`", meta.version)?;
7372

7473
// add recommended notice
7574
if is_recommended {
76-
writeln!(content, ":::note")?;
75+
writeln!(content, "> [!NOTE]")?;
7776
writeln!(
7877
content,
79-
"- This rule is recommended. A diagnostic error will appear when linting your code."
78+
"> - This rule is recommended. A diagnostic error will appear when linting your code."
8079
)?;
81-
writeln!(content, ":::")?;
8280
}
8381

82+
writeln!(content)?;
83+
8484
// add source information
8585
if !meta.sources.is_empty() {
8686
writeln!(content, "Sources: ")?;

docs/rules/ban-drop-column.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# banDropColumn
22
**Diagnostic Category: `lint/safety/banDropColumn`**
3+
34
**Since**: `vnext`
4-
:::note
5-
- This rule is recommended. A diagnostic error will appear when linting your code.
6-
:::
5+
> [!NOTE]
6+
> - This rule is recommended. A diagnostic error will appear when linting your code.
7+
78
Sources:
89
- Inspired from: <a href="https://squawkhq.com/docs/ban-drop-column" target="_blank"><code>squawk/ban-drop-column</code></a>
910

docs/rules/ban-drop-not-null.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# banDropNotNull
22
**Diagnostic Category: `lint/safety/banDropNotNull`**
3+
34
**Since**: `vnext`
4-
:::note
5-
- This rule is recommended. A diagnostic error will appear when linting your code.
6-
:::
5+
> [!NOTE]
6+
> - This rule is recommended. A diagnostic error will appear when linting your code.
7+
78
Sources:
89
- Inspired from: <a href="https://squawkhq.com/docs/ban-drop-not-null" target="_blank"><code>squawk/ban-drop-not-null</code></a>
910

0 commit comments

Comments
 (0)