@@ -153,27 +153,18 @@ pub struct Safety {
153153 #[ doc = "Dropping a NOT NULL constraint may break existing clients." ]
154154 #[ serde( skip_serializing_if = "Option::is_none" ) ]
155155 pub ban_drop_not_null : Option < RuleConfiguration < pglt_analyser:: options:: BanDropNotNull > > ,
156- <<<<<<< HEAD
157- #[ doc = "Succinct description of the rule." ]
158- =======
159156 #[ doc = "Dropping a table may break existing clients." ]
160- >>>>>>> cbc49c8 ( feat ( rules) : adding-required-field)
161157 #[ serde( skip_serializing_if = "Option::is_none" ) ]
162158 pub ban_drop_table : Option < RuleConfiguration < pglt_analyser:: options:: BanDropTable > > ,
163159}
164160impl Safety {
165161 const GROUP_NAME : & ' static str = "safety" ;
166- <<<<<<< HEAD
167- pub( crate ) const GROUP_RULES : & ' static [ & ' static str ] =
168- & [ "banDropColumn", "banDropNotNull" , "banDropTable" ] ;
169- =======
170162 pub ( crate ) const GROUP_RULES : & ' static [ & ' static str ] = & [
171163 "addingRequiredField" ,
172164 "banDropColumn" ,
173165 "banDropNotNull" ,
174166 "banDropTable" ,
175167 ] ;
176- >>>>>>> cbc49c8 ( feat( rules) : adding-required-field )
177168 const RECOMMENDED_RULES : & ' static [ & ' static str ] = & [ "banDropColumn" , "banDropNotNull" ] ;
178169 const RECOMMENDED_RULES_AS_FILTERS : & ' static [ RuleFilter < ' static > ] = & [
179170 RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 1 ] ) ,
@@ -183,10 +174,7 @@ impl Safety {
183174 RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 0 ] ) ,
184175 RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 1 ] ) ,
185176 RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 2 ] ) ,
186- <<<<<<< HEAD
187- =======
188177 RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 3 ] ) ,
189- >>>>>>> cbc49c8 ( feat( rules) : adding-required-field )
190178 ] ;
191179 #[ doc = r" Retrieves the recommended rules" ]
192180 pub ( crate ) fn is_recommended_true ( & self ) -> bool {
@@ -213,23 +201,16 @@ impl Safety {
213201 index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 1 ] ) ) ;
214202 }
215203 }
216- <<<<<<< HEAD
217- if let Some ( rule) = self . ban_drop_table. as_ref( ) {
218- =======
219204 if let Some ( rule) = self . ban_drop_not_null . as_ref ( ) {
220- >>>>>>> cbc49c8 ( feat( rules) : adding-required-field )
221205 if rule. is_enabled ( ) {
222206 index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 2 ] ) ) ;
223207 }
224208 }
225- <<<<<<< HEAD
226- =======
227209 if let Some ( rule) = self . ban_drop_table . as_ref ( ) {
228210 if rule. is_enabled ( ) {
229211 index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 3 ] ) ) ;
230212 }
231213 }
232- >>>>>>> cbc49c8 ( feat( rules) : adding-required-field )
233214 index_set
234215 }
235216 pub ( crate ) fn get_disabled_rules ( & self ) -> FxHashSet < RuleFilter < ' static > > {
@@ -244,23 +225,16 @@ impl Safety {
244225 index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 1 ] ) ) ;
245226 }
246227 }
247- <<<<<<< HEAD
248- if let Some ( rule ) = self . ban_drop_table. as_ref ( ) {
249- =======
250228 if let Some ( rule) = self . ban_drop_not_null . as_ref ( ) {
251- >>>>>>> cbc49c8 ( feat( rules) : adding-required-field )
252229 if rule. is_disabled ( ) {
253230 index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 2 ] ) ) ;
254231 }
255232 }
256- <<<<<<< HEAD
257- =======
258233 if let Some ( rule) = self . ban_drop_table . as_ref ( ) {
259234 if rule. is_disabled ( ) {
260235 index_set. insert ( RuleFilter :: Rule ( Self :: GROUP_NAME , Self :: GROUP_RULES [ 3 ] ) ) ;
261236 }
262237 }
263- >>>>>>> cbc49c8 ( feat( rules) : adding-required-field )
264238 index_set
265239 }
266240 #[ doc = r" Checks if, given a rule name, matches one of the rules contained in this category" ]
0 commit comments