@@ -153,27 +153,18 @@ pub struct Safety {
153
153
#[ doc = "Dropping a NOT NULL constraint may break existing clients." ]
154
154
#[ serde( skip_serializing_if = "Option::is_none" ) ]
155
155
pub ban_drop_not_null : Option < RuleConfiguration < pglt_analyser:: options:: BanDropNotNull > > ,
156
- <<<<<<< HEAD
157
- #[ doc = "Succinct description of the rule." ]
158
- =======
159
156
#[ doc = "Dropping a table may break existing clients." ]
160
- >>>>>>> cbc49c8 ( feat ( rules) : adding-required-field)
161
157
#[ serde( skip_serializing_if = "Option::is_none" ) ]
162
158
pub ban_drop_table : Option < RuleConfiguration < pglt_analyser:: options:: BanDropTable > > ,
163
159
}
164
160
impl Safety {
165
161
const GROUP_NAME : & ' static str = "safety" ;
166
- <<<<<<< HEAD
167
- pub( crate ) const GROUP_RULES : & ' static [ & ' static str ] =
168
- & [ "banDropColumn", "banDropNotNull" , "banDropTable" ] ;
169
- =======
170
162
pub ( crate ) const GROUP_RULES : & ' static [ & ' static str ] = & [
171
163
"addingRequiredField" ,
172
164
"banDropColumn" ,
173
165
"banDropNotNull" ,
174
166
"banDropTable" ,
175
167
] ;
176
- >>>>>>> cbc49c8 ( feat( rules) : adding-required-field )
177
168
const RECOMMENDED_RULES : & ' static [ & ' static str ] = & [ "banDropColumn" , "banDropNotNull" ] ;
178
169
const RECOMMENDED_RULES_AS_FILTERS : & ' static [ RuleFilter < ' static > ] = & [
179
170
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 1 ] ) ,
@@ -183,10 +174,7 @@ impl Safety {
183
174
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 0 ] ) ,
184
175
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 1 ] ) ,
185
176
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 2 ] ) ,
186
- <<<<<<< HEAD
187
- =======
188
177
RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 3 ] ) ,
189
- >>>>>>> cbc49c8 ( feat( rules) : adding-required-field )
190
178
] ;
191
179
#[ doc = r" Retrieves the recommended rules" ]
192
180
pub ( crate ) fn is_recommended_true ( & self ) -> bool {
@@ -213,23 +201,16 @@ impl Safety {
213
201
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 1 ] ) ) ;
214
202
}
215
203
}
216
- <<<<<<< HEAD
217
- if let Some ( rule) = self . ban_drop_table. as_ref( ) {
218
- =======
219
204
if let Some ( rule) = self . ban_drop_not_null . as_ref ( ) {
220
- >>>>>>> cbc49c8 ( feat( rules) : adding-required-field )
221
205
if rule. is_enabled ( ) {
222
206
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 2 ] ) ) ;
223
207
}
224
208
}
225
- <<<<<<< HEAD
226
- =======
227
209
if let Some ( rule) = self . ban_drop_table . as_ref ( ) {
228
210
if rule. is_enabled ( ) {
229
211
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 3 ] ) ) ;
230
212
}
231
213
}
232
- >>>>>>> cbc49c8 ( feat( rules) : adding-required-field )
233
214
index_set
234
215
}
235
216
pub ( crate ) fn get_disabled_rules ( & self ) -> FxHashSet < RuleFilter < ' static > > {
@@ -244,23 +225,16 @@ impl Safety {
244
225
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 1 ] ) ) ;
245
226
}
246
227
}
247
- <<<<<<< HEAD
248
- if let Some ( rule ) = self . ban_drop_table. as_ref ( ) {
249
- =======
250
228
if let Some ( rule) = self . ban_drop_not_null . as_ref ( ) {
251
- >>>>>>> cbc49c8 ( feat( rules) : adding-required-field )
252
229
if rule. is_disabled ( ) {
253
230
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 2 ] ) ) ;
254
231
}
255
232
}
256
- <<<<<<< HEAD
257
- =======
258
233
if let Some ( rule) = self . ban_drop_table . as_ref ( ) {
259
234
if rule. is_disabled ( ) {
260
235
index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 3 ] ) ) ;
261
236
}
262
237
}
263
- >>>>>>> cbc49c8 ( feat( rules) : adding-required-field )
264
238
index_set
265
239
}
266
240
#[ doc = r" Checks if, given a rule name, matches one of the rules contained in this category" ]
0 commit comments