Skip to content

Commit d0f0ac8

Browse files
soy confused
1 parent 1a11556 commit d0f0ac8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

crates/pglt_analyser/src/lint/safety/ban_drop_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ declare_lint_rule! {
1818
pub BanDropTable {
1919
version: "next",
2020
name: "banDropTable",
21-
recommended: false,
21+
recommended: true,
2222
sources: &[RuleSource::Squawk("ban-drop-table")],
2323
}
2424
}

crates/pglt_configuration/src/analyser/linter/rules.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,20 @@ pub struct Safety {
149149
#[doc = "Dropping a NOT NULL constraint may break existing clients."]
150150
#[serde(skip_serializing_if = "Option::is_none")]
151151
pub ban_drop_not_null: Option<RuleConfiguration<pglt_analyser::options::BanDropNotNull>>,
152-
#[doc = "Succinct description of the rule."]
152+
#[doc = "Dropping a table may break existing clients."]
153153
#[serde(skip_serializing_if = "Option::is_none")]
154154
pub ban_drop_table: Option<RuleConfiguration<pglt_analyser::options::BanDropTable>>,
155155
}
156156
impl Safety {
157157
const GROUP_NAME: &'static str = "safety";
158158
pub(crate) const GROUP_RULES: &'static [&'static str] =
159159
&["banDropColumn", "banDropNotNull", "banDropTable"];
160-
const RECOMMENDED_RULES: &'static [&'static str] = &["banDropColumn", "banDropNotNull"];
160+
const RECOMMENDED_RULES: &'static [&'static str] =
161+
&["banDropColumn", "banDropNotNull", "banDropTable"];
161162
const RECOMMENDED_RULES_AS_FILTERS: &'static [RuleFilter<'static>] = &[
162163
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),
163164
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[1]),
165+
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2]),
164166
];
165167
const ALL_RULES_AS_FILTERS: &'static [RuleFilter<'static>] = &[
166168
RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]),

0 commit comments

Comments
 (0)