From cd9b75e0afcfe8370e1880ca10941682e8d55bbe Mon Sep 17 00:00:00 2001 From: Julian Date: Sat, 19 Jul 2025 14:52:38 +0200 Subject: [PATCH 1/8] ok? --- docs/codegen/src/rules_index.rs | 2 +- docs/codegen/src/rules_sources.rs | 4 ++-- docs/rule_sources.md | 19 +++++++++++-------- docs/rules.md | 22 ++++++++++------------ 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/docs/codegen/src/rules_index.rs b/docs/codegen/src/rules_index.rs index 655e4bdb2..fbeb22267 100644 --- a/docs/codegen/src/rules_index.rs +++ b/docs/codegen/src/rules_index.rs @@ -69,7 +69,7 @@ fn generate_group( write!( content, - "| [{rule_name}](/rules/{dashed_rule}) | {summary} | {properties} |" + "| [{rule_name}](rules/{dashed_rule}) | {summary} | {properties} |" )?; writeln!(content)?; diff --git a/docs/codegen/src/rules_sources.rs b/docs/codegen/src/rules_sources.rs index b8fac23d8..fed16d181 100644 --- a/docs/codegen/src/rules_sources.rs +++ b/docs/codegen/src/rules_sources.rs @@ -48,12 +48,12 @@ pub fn generate_rule_sources(docs_dir: &Path) -> anyhow::Result<()> { for (rule_name, metadata) in rules { let kebab_rule_name = Case::Kebab.convert(rule_name); if metadata.sources.is_empty() { - exclusive_rules.insert((rule_name.to_string(), format!("./rules/{kebab_rule_name}"))); + exclusive_rules.insert((rule_name.to_string(), format!("rules/{kebab_rule_name}"))); } else { for source in metadata.sources { let source_set = SourceSet { rule_name: rule_name.to_string(), - link: format!("./rules/{kebab_rule_name}"), + link: format!("rules/{kebab_rule_name}"), source_link: source.to_rule_url(), source_rule_name: source.as_rule_name().to_string(), }; diff --git a/docs/rule_sources.md b/docs/rule_sources.md index 8c0f085d4..401c168b4 100644 --- a/docs/rule_sources.md +++ b/docs/rule_sources.md @@ -1,11 +1,14 @@ ## Exclusive rules + ## Rules from other sources + ### Squawk -| Squawk Rule Name | Rule Name | -| ---- | ---- | -| [adding-required-field](https://squawkhq.com/docs/adding-required-field) |[addingRequiredField](./rules/adding-required-field) | -| [ban-drop-column](https://squawkhq.com/docs/ban-drop-column) |[banDropColumn](./rules/ban-drop-column) | -| [ban-drop-database](https://squawkhq.com/docs/ban-drop-database) |[banDropDatabase](./rules/ban-drop-database) | -| [ban-drop-not-null](https://squawkhq.com/docs/ban-drop-not-null) |[banDropNotNull](./rules/ban-drop-not-null) | -| [ban-drop-table](https://squawkhq.com/docs/ban-drop-table) |[banDropTable](./rules/ban-drop-table) | -| [ban-truncate-cascade](https://squawkhq.com/docs/ban-truncate-cascade) |[banTruncateCascade](./rules/ban-truncate-cascade) | + +| Squawk Rule Name | Rule Name | +| ------------------------------------------------------------------------ | -------------------------------------------------- | +| [adding-required-field](https://squawkhq.com/docs/adding-required-field) | [addingRequiredField](rules/adding-required-field) | +| [ban-drop-column](https://squawkhq.com/docs/ban-drop-column) | [banDropColumn](rules/ban-drop-column) | +| [ban-drop-database](https://squawkhq.com/docs/ban-drop-database) | [banDropDatabase](rules/ban-drop-database) | +| [ban-drop-not-null](https://squawkhq.com/docs/ban-drop-not-null) | [banDropNotNull](rules/ban-drop-not-null) | +| [ban-drop-table](https://squawkhq.com/docs/ban-drop-table) | [banDropTable](rules/ban-drop-table) | +| [ban-truncate-cascade](https://squawkhq.com/docs/ban-truncate-cascade) | [banTruncateCascade](rules/ban-truncate-cascade) | diff --git a/docs/rules.md b/docs/rules.md index 19e110c6a..d00a967dd 100644 --- a/docs/rules.md +++ b/docs/rules.md @@ -4,21 +4,19 @@ Below the list of rules supported by Postgres Language Tools, divided by group. - The icon ✅ indicates that the rule is part of the recommended rules. -[//]: # (BEGIN RULES_INDEX) +[//]: # "BEGIN RULES_INDEX" ## Safety Rules that detect potential safety issues in your code. -| Rule name | Description | Properties | -| --- | --- | --- | -| [addingRequiredField](/rules/adding-required-field) | Adding a new column that is NOT NULL and has no default value to an existing table effectively makes it required. | | -| [banDropColumn](/rules/ban-drop-column) | Dropping a column may break existing clients. | ✅ | -| [banDropDatabase](/rules/ban-drop-database) | Dropping a database may break existing clients (and everything else, really). | | -| [banDropNotNull](/rules/ban-drop-not-null) | Dropping a NOT NULL constraint may break existing clients. | ✅ | -| [banDropTable](/rules/ban-drop-table) | Dropping a table may break existing clients. | ✅ | -| [banTruncateCascade](/rules/ban-truncate-cascade) | Using `TRUNCATE`'s `CASCADE` option will truncate any tables that are also foreign-keyed to the specified tables. | | - -[//]: # (END RULES_INDEX) - +| Rule name | Description | Properties | +| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------- | +| [addingRequiredField](rules/adding-required-field) | Adding a new column that is NOT NULL and has no default value to an existing table effectively makes it required. | | +| [banDropColumn](rules/ban-drop-column) | Dropping a column may break existing clients. | ✅ | +| [banDropDatabase](rules/ban-drop-database) | Dropping a database may break existing clients (and everything else, really). | | +| [banDropNotNull](rules/ban-drop-not-null) | Dropping a NOT NULL constraint may break existing clients. | ✅ | +| [banDropTable](rules/ban-drop-table) | Dropping a table may break existing clients. | ✅ | +| [banTruncateCascade](rules/ban-truncate-cascade) | Using `TRUNCATE`'s `CASCADE` option will truncate any tables that are also foreign-keyed to the specified tables. | | +[//]: # "END RULES_INDEX" From 9bd17de8e3991be3213fe0076d7ca7be4083cde2 Mon Sep 17 00:00:00 2001 From: Julian Date: Sat, 19 Jul 2025 14:53:47 +0200 Subject: [PATCH 2/8] ok --- docs/rule_sources.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/docs/rule_sources.md b/docs/rule_sources.md index 401c168b4..8a3730f5d 100644 --- a/docs/rule_sources.md +++ b/docs/rule_sources.md @@ -1,14 +1,11 @@ ## Exclusive rules - ## Rules from other sources - ### Squawk - -| Squawk Rule Name | Rule Name | -| ------------------------------------------------------------------------ | -------------------------------------------------- | -| [adding-required-field](https://squawkhq.com/docs/adding-required-field) | [addingRequiredField](rules/adding-required-field) | -| [ban-drop-column](https://squawkhq.com/docs/ban-drop-column) | [banDropColumn](rules/ban-drop-column) | -| [ban-drop-database](https://squawkhq.com/docs/ban-drop-database) | [banDropDatabase](rules/ban-drop-database) | -| [ban-drop-not-null](https://squawkhq.com/docs/ban-drop-not-null) | [banDropNotNull](rules/ban-drop-not-null) | -| [ban-drop-table](https://squawkhq.com/docs/ban-drop-table) | [banDropTable](rules/ban-drop-table) | -| [ban-truncate-cascade](https://squawkhq.com/docs/ban-truncate-cascade) | [banTruncateCascade](rules/ban-truncate-cascade) | +| Squawk Rule Name | Rule Name | +| ---- | ---- | +| [adding-required-field](https://squawkhq.com/docs/adding-required-field) |[addingRequiredField](rules/adding-required-field) | +| [ban-drop-column](https://squawkhq.com/docs/ban-drop-column) |[banDropColumn](rules/ban-drop-column) | +| [ban-drop-database](https://squawkhq.com/docs/ban-drop-database) |[banDropDatabase](rules/ban-drop-database) | +| [ban-drop-not-null](https://squawkhq.com/docs/ban-drop-not-null) |[banDropNotNull](rules/ban-drop-not-null) | +| [ban-drop-table](https://squawkhq.com/docs/ban-drop-table) |[banDropTable](rules/ban-drop-table) | +| [ban-truncate-cascade](https://squawkhq.com/docs/ban-truncate-cascade) |[banTruncateCascade](rules/ban-truncate-cascade) | From 66f8b26ce0b62d44ab67675eee68c366fda53760 Mon Sep 17 00:00:00 2001 From: Julian Date: Sat, 19 Jul 2025 15:00:25 +0200 Subject: [PATCH 3/8] that one then --- docs/codegen/src/rules_index.rs | 2 +- docs/codegen/src/rules_sources.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/codegen/src/rules_index.rs b/docs/codegen/src/rules_index.rs index fbeb22267..99d22580e 100644 --- a/docs/codegen/src/rules_index.rs +++ b/docs/codegen/src/rules_index.rs @@ -69,7 +69,7 @@ fn generate_group( write!( content, - "| [{rule_name}](rules/{dashed_rule}) | {summary} | {properties} |" + "| [{rule_name}](./{dashed_rule}) | {summary} | {properties} |" )?; writeln!(content)?; diff --git a/docs/codegen/src/rules_sources.rs b/docs/codegen/src/rules_sources.rs index fed16d181..5b21ea933 100644 --- a/docs/codegen/src/rules_sources.rs +++ b/docs/codegen/src/rules_sources.rs @@ -48,12 +48,12 @@ pub fn generate_rule_sources(docs_dir: &Path) -> anyhow::Result<()> { for (rule_name, metadata) in rules { let kebab_rule_name = Case::Kebab.convert(rule_name); if metadata.sources.is_empty() { - exclusive_rules.insert((rule_name.to_string(), format!("rules/{kebab_rule_name}"))); + exclusive_rules.insert((rule_name.to_string(), format!("../rules/{kebab_rule_name}"))); } else { for source in metadata.sources { let source_set = SourceSet { rule_name: rule_name.to_string(), - link: format!("rules/{kebab_rule_name}"), + link: format!("../rules/{kebab_rule_name}"), source_link: source.to_rule_url(), source_rule_name: source.as_rule_name().to_string(), }; From e973eaa4a08a3b9f0d6bce8b10a324d5a5a8cb3f Mon Sep 17 00:00:00 2001 From: Julian Date: Sat, 19 Jul 2025 15:00:49 +0200 Subject: [PATCH 4/8] k --- docs/rule_sources.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/rule_sources.md b/docs/rule_sources.md index 8a3730f5d..679448cdc 100644 --- a/docs/rule_sources.md +++ b/docs/rule_sources.md @@ -3,9 +3,9 @@ ### Squawk | Squawk Rule Name | Rule Name | | ---- | ---- | -| [adding-required-field](https://squawkhq.com/docs/adding-required-field) |[addingRequiredField](rules/adding-required-field) | -| [ban-drop-column](https://squawkhq.com/docs/ban-drop-column) |[banDropColumn](rules/ban-drop-column) | -| [ban-drop-database](https://squawkhq.com/docs/ban-drop-database) |[banDropDatabase](rules/ban-drop-database) | -| [ban-drop-not-null](https://squawkhq.com/docs/ban-drop-not-null) |[banDropNotNull](rules/ban-drop-not-null) | -| [ban-drop-table](https://squawkhq.com/docs/ban-drop-table) |[banDropTable](rules/ban-drop-table) | -| [ban-truncate-cascade](https://squawkhq.com/docs/ban-truncate-cascade) |[banTruncateCascade](rules/ban-truncate-cascade) | +| [adding-required-field](https://squawkhq.com/docs/adding-required-field) |[addingRequiredField](../rules/adding-required-field) | +| [ban-drop-column](https://squawkhq.com/docs/ban-drop-column) |[banDropColumn](../rules/ban-drop-column) | +| [ban-drop-database](https://squawkhq.com/docs/ban-drop-database) |[banDropDatabase](../rules/ban-drop-database) | +| [ban-drop-not-null](https://squawkhq.com/docs/ban-drop-not-null) |[banDropNotNull](../rules/ban-drop-not-null) | +| [ban-drop-table](https://squawkhq.com/docs/ban-drop-table) |[banDropTable](../rules/ban-drop-table) | +| [ban-truncate-cascade](https://squawkhq.com/docs/ban-truncate-cascade) |[banTruncateCascade](../rules/ban-truncate-cascade) | From 4267ac582aedac8b32ac756dac994be8657d1048 Mon Sep 17 00:00:00 2001 From: Julian Date: Sat, 19 Jul 2025 15:03:25 +0200 Subject: [PATCH 5/8] hm --- docs/rule_sources.md | 19 +++++++++++-------- docs/rules.md | 16 ++++++++-------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/docs/rule_sources.md b/docs/rule_sources.md index 679448cdc..8fea42753 100644 --- a/docs/rule_sources.md +++ b/docs/rule_sources.md @@ -1,11 +1,14 @@ ## Exclusive rules + ## Rules from other sources + ### Squawk -| Squawk Rule Name | Rule Name | -| ---- | ---- | -| [adding-required-field](https://squawkhq.com/docs/adding-required-field) |[addingRequiredField](../rules/adding-required-field) | -| [ban-drop-column](https://squawkhq.com/docs/ban-drop-column) |[banDropColumn](../rules/ban-drop-column) | -| [ban-drop-database](https://squawkhq.com/docs/ban-drop-database) |[banDropDatabase](../rules/ban-drop-database) | -| [ban-drop-not-null](https://squawkhq.com/docs/ban-drop-not-null) |[banDropNotNull](../rules/ban-drop-not-null) | -| [ban-drop-table](https://squawkhq.com/docs/ban-drop-table) |[banDropTable](../rules/ban-drop-table) | -| [ban-truncate-cascade](https://squawkhq.com/docs/ban-truncate-cascade) |[banTruncateCascade](../rules/ban-truncate-cascade) | + +| Squawk Rule Name | Rule Name | +| ------------------------------------------------------------------------ | ----------------------------------------------------- | +| [adding-required-field](https://squawkhq.com/docs/adding-required-field) | [addingRequiredField](../rules/adding-required-field) | +| [ban-drop-column](https://squawkhq.com/docs/ban-drop-column) | [banDropColumn](../rules/ban-drop-column) | +| [ban-drop-database](https://squawkhq.com/docs/ban-drop-database) | [banDropDatabase](../rules/ban-drop-database) | +| [ban-drop-not-null](https://squawkhq.com/docs/ban-drop-not-null) | [banDropNotNull](../rules/ban-drop-not-null) | +| [ban-drop-table](https://squawkhq.com/docs/ban-drop-table) | [banDropTable](../rules/ban-drop-table) | +| [ban-truncate-cascade](https://squawkhq.com/docs/ban-truncate-cascade) | [banTruncateCascade](../rules/ban-truncate-cascade) | diff --git a/docs/rules.md b/docs/rules.md index d00a967dd..b72604753 100644 --- a/docs/rules.md +++ b/docs/rules.md @@ -10,13 +10,13 @@ Below the list of rules supported by Postgres Language Tools, divided by group. Rules that detect potential safety issues in your code. -| Rule name | Description | Properties | -| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------- | -| [addingRequiredField](rules/adding-required-field) | Adding a new column that is NOT NULL and has no default value to an existing table effectively makes it required. | | -| [banDropColumn](rules/ban-drop-column) | Dropping a column may break existing clients. | ✅ | -| [banDropDatabase](rules/ban-drop-database) | Dropping a database may break existing clients (and everything else, really). | | -| [banDropNotNull](rules/ban-drop-not-null) | Dropping a NOT NULL constraint may break existing clients. | ✅ | -| [banDropTable](rules/ban-drop-table) | Dropping a table may break existing clients. | ✅ | -| [banTruncateCascade](rules/ban-truncate-cascade) | Using `TRUNCATE`'s `CASCADE` option will truncate any tables that are also foreign-keyed to the specified tables. | | +| Rule name | Description | Properties | +| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------- | +| [addingRequiredField](./adding-required-field) | Adding a new column that is NOT NULL and has no default value to an existing table effectively makes it required. | | +| [banDropColumn](./ban-drop-column) | Dropping a column may break existing clients. | ✅ | +| [banDropDatabase](./ban-drop-database) | Dropping a database may break existing clients (and everything else, really). | | +| [banDropNotNull](./ban-drop-not-null) | Dropping a NOT NULL constraint may break existing clients. | ✅ | +| [banDropTable](./ban-drop-table) | Dropping a table may break existing clients. | ✅ | +| [banTruncateCascade](./ban-truncate-cascade) | Using `TRUNCATE`'s `CASCADE` option will truncate any tables that are also foreign-keyed to the specified tables. | | [//]: # "END RULES_INDEX" From 6a9f6b74c97bf496e4c1554080d3427fa0aca6f0 Mon Sep 17 00:00:00 2001 From: Julian Date: Sat, 19 Jul 2025 15:21:30 +0200 Subject: [PATCH 6/8] fix those too --- crates/pgt_diagnostics_categories/src/categories.rs | 12 ++++++------ xtask/codegen/src/generate_new_analyser_rule.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/pgt_diagnostics_categories/src/categories.rs b/crates/pgt_diagnostics_categories/src/categories.rs index d5ce48d7e..b9d296985 100644 --- a/crates/pgt_diagnostics_categories/src/categories.rs +++ b/crates/pgt_diagnostics_categories/src/categories.rs @@ -13,12 +13,12 @@ // must be between `define_categories! {\n` and `\n ;\n`. define_categories! { - "lint/safety/addingRequiredField": "https://pglt.dev/linter/rules/adding-required-field", - "lint/safety/banDropColumn": "https://pglt.dev/linter/rules/ban-drop-column", - "lint/safety/banDropDatabase": "https://pgtools.dev/linter/rules/ban-drop-database", - "lint/safety/banDropNotNull": "https://pglt.dev/linter/rules/ban-drop-not-null", - "lint/safety/banDropTable": "https://pglt.dev/linter/rules/ban-drop-table", - "lint/safety/banTruncateCascade": "https://pgtools.dev/linter/rules/ban-truncate-cascade", + "lint/safety/addingRequiredField": "https://pgtools.dev/latest/rules/adding-required-field", + "lint/safety/banDropColumn": "https://pgtools.dev/latest/rules/ban-drop-column", + "lint/safety/banDropDatabase": "https://pgtools.dev/latest/rules/ban-drop-database", + "lint/safety/banDropNotNull": "https://pgtools.dev/latest/rules/ban-drop-not-null", + "lint/safety/banDropTable": "https://pgtools.dev/latest/rules/ban-drop-table", + "lint/safety/banTruncateCascade": "https://pgtools.dev/latest/rules/ban-truncate-cascade", // end lint rules ; // General categories diff --git a/xtask/codegen/src/generate_new_analyser_rule.rs b/xtask/codegen/src/generate_new_analyser_rule.rs index 343b06731..4c4bcc696 100644 --- a/xtask/codegen/src/generate_new_analyser_rule.rs +++ b/xtask/codegen/src/generate_new_analyser_rule.rs @@ -132,7 +132,7 @@ pub fn generate_new_analyser_rule( // We sort rules to reduce conflicts between contributions made in parallel. let rule_line = match category { Category::Lint => format!( - r#" "lint/{group}/{rule_name_camel}": "https://pgtools.dev/linter/rules/{kebab_case_rule}","# + r#" "lint/{group}/{rule_name_camel}": "https://pgtools.dev/latest/rules/{kebab_case_rule}","# ), }; let lint_start = match category { From b2a02add2c952fa7b695f2432740d335432a499a Mon Sep 17 00:00:00 2001 From: Julian Date: Sat, 19 Jul 2025 16:27:33 +0200 Subject: [PATCH 7/8] reverted that, will be overwritten in codegen --- docs/rules.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/rules.md b/docs/rules.md index b72604753..19e110c6a 100644 --- a/docs/rules.md +++ b/docs/rules.md @@ -4,19 +4,21 @@ Below the list of rules supported by Postgres Language Tools, divided by group. - The icon ✅ indicates that the rule is part of the recommended rules. -[//]: # "BEGIN RULES_INDEX" +[//]: # (BEGIN RULES_INDEX) ## Safety Rules that detect potential safety issues in your code. -| Rule name | Description | Properties | -| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------- | -| [addingRequiredField](./adding-required-field) | Adding a new column that is NOT NULL and has no default value to an existing table effectively makes it required. | | -| [banDropColumn](./ban-drop-column) | Dropping a column may break existing clients. | ✅ | -| [banDropDatabase](./ban-drop-database) | Dropping a database may break existing clients (and everything else, really). | | -| [banDropNotNull](./ban-drop-not-null) | Dropping a NOT NULL constraint may break existing clients. | ✅ | -| [banDropTable](./ban-drop-table) | Dropping a table may break existing clients. | ✅ | -| [banTruncateCascade](./ban-truncate-cascade) | Using `TRUNCATE`'s `CASCADE` option will truncate any tables that are also foreign-keyed to the specified tables. | | +| Rule name | Description | Properties | +| --- | --- | --- | +| [addingRequiredField](/rules/adding-required-field) | Adding a new column that is NOT NULL and has no default value to an existing table effectively makes it required. | | +| [banDropColumn](/rules/ban-drop-column) | Dropping a column may break existing clients. | ✅ | +| [banDropDatabase](/rules/ban-drop-database) | Dropping a database may break existing clients (and everything else, really). | | +| [banDropNotNull](/rules/ban-drop-not-null) | Dropping a NOT NULL constraint may break existing clients. | ✅ | +| [banDropTable](/rules/ban-drop-table) | Dropping a table may break existing clients. | ✅ | +| [banTruncateCascade](/rules/ban-truncate-cascade) | Using `TRUNCATE`'s `CASCADE` option will truncate any tables that are also foreign-keyed to the specified tables. | | + +[//]: # (END RULES_INDEX) + -[//]: # "END RULES_INDEX" From b5fd7738abc79a153dda6708a31b23463b64adf1 Mon Sep 17 00:00:00 2001 From: Julian Date: Sat, 19 Jul 2025 16:28:41 +0200 Subject: [PATCH 8/8] what --- docs/rule_sources.md | 19 ++++++++----------- docs/rules.md | 12 ++++++------ 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/docs/rule_sources.md b/docs/rule_sources.md index 8fea42753..679448cdc 100644 --- a/docs/rule_sources.md +++ b/docs/rule_sources.md @@ -1,14 +1,11 @@ ## Exclusive rules - ## Rules from other sources - ### Squawk - -| Squawk Rule Name | Rule Name | -| ------------------------------------------------------------------------ | ----------------------------------------------------- | -| [adding-required-field](https://squawkhq.com/docs/adding-required-field) | [addingRequiredField](../rules/adding-required-field) | -| [ban-drop-column](https://squawkhq.com/docs/ban-drop-column) | [banDropColumn](../rules/ban-drop-column) | -| [ban-drop-database](https://squawkhq.com/docs/ban-drop-database) | [banDropDatabase](../rules/ban-drop-database) | -| [ban-drop-not-null](https://squawkhq.com/docs/ban-drop-not-null) | [banDropNotNull](../rules/ban-drop-not-null) | -| [ban-drop-table](https://squawkhq.com/docs/ban-drop-table) | [banDropTable](../rules/ban-drop-table) | -| [ban-truncate-cascade](https://squawkhq.com/docs/ban-truncate-cascade) | [banTruncateCascade](../rules/ban-truncate-cascade) | +| Squawk Rule Name | Rule Name | +| ---- | ---- | +| [adding-required-field](https://squawkhq.com/docs/adding-required-field) |[addingRequiredField](../rules/adding-required-field) | +| [ban-drop-column](https://squawkhq.com/docs/ban-drop-column) |[banDropColumn](../rules/ban-drop-column) | +| [ban-drop-database](https://squawkhq.com/docs/ban-drop-database) |[banDropDatabase](../rules/ban-drop-database) | +| [ban-drop-not-null](https://squawkhq.com/docs/ban-drop-not-null) |[banDropNotNull](../rules/ban-drop-not-null) | +| [ban-drop-table](https://squawkhq.com/docs/ban-drop-table) |[banDropTable](../rules/ban-drop-table) | +| [ban-truncate-cascade](https://squawkhq.com/docs/ban-truncate-cascade) |[banTruncateCascade](../rules/ban-truncate-cascade) | diff --git a/docs/rules.md b/docs/rules.md index 19e110c6a..d74b67e88 100644 --- a/docs/rules.md +++ b/docs/rules.md @@ -12,12 +12,12 @@ Rules that detect potential safety issues in your code. | Rule name | Description | Properties | | --- | --- | --- | -| [addingRequiredField](/rules/adding-required-field) | Adding a new column that is NOT NULL and has no default value to an existing table effectively makes it required. | | -| [banDropColumn](/rules/ban-drop-column) | Dropping a column may break existing clients. | ✅ | -| [banDropDatabase](/rules/ban-drop-database) | Dropping a database may break existing clients (and everything else, really). | | -| [banDropNotNull](/rules/ban-drop-not-null) | Dropping a NOT NULL constraint may break existing clients. | ✅ | -| [banDropTable](/rules/ban-drop-table) | Dropping a table may break existing clients. | ✅ | -| [banTruncateCascade](/rules/ban-truncate-cascade) | Using `TRUNCATE`'s `CASCADE` option will truncate any tables that are also foreign-keyed to the specified tables. | | +| [addingRequiredField](./adding-required-field) | Adding a new column that is NOT NULL and has no default value to an existing table effectively makes it required. | | +| [banDropColumn](./ban-drop-column) | Dropping a column may break existing clients. | ✅ | +| [banDropDatabase](./ban-drop-database) | Dropping a database may break existing clients (and everything else, really). | | +| [banDropNotNull](./ban-drop-not-null) | Dropping a NOT NULL constraint may break existing clients. | ✅ | +| [banDropTable](./ban-drop-table) | Dropping a table may break existing clients. | ✅ | +| [banTruncateCascade](./ban-truncate-cascade) | Using `TRUNCATE`'s `CASCADE` option will truncate any tables that are also foreign-keyed to the specified tables. | | [//]: # (END RULES_INDEX)