@@ -185,7 +185,7 @@ def long_message(self) -> str:
185
185
return (
186
186
f"Rule '{ self .rule_name } ' has changed in current build compared to previous "
187
187
"build (stanza hashes differ); the detection version should be bumped "
188
- f"to at least { self .previous_version + 1 } ."
188
+ f"to { self .previous_version + 1 } ."
189
189
)
190
190
191
191
@property
@@ -194,4 +194,30 @@ def short_message(self) -> str:
194
194
A short-form error message
195
195
:returns: a str, the message
196
196
"""
197
- return f"Detection version in current build should be bumped to at least { self .previous_version + 1 } ."
197
+ return f"Detection version in current build should be bumped to { self .previous_version + 1 } ."
198
+
199
+
200
+ class VersionBumpingTooFarError (VersioningError ):
201
+ """
202
+ An error indicating the detection changed but its version was bumped too far
203
+ """
204
+
205
+ @property
206
+ def long_message (self ) -> str :
207
+ """
208
+ A long-form error message
209
+ :returns: a str, the message
210
+ """
211
+ return (
212
+ f"Rule '{ self .rule_name } ' has changed in current build compared to previous "
213
+ "build (stanza hashes differ); however the detection version increased too much"
214
+ f"The version should be reduced to { self .previous_version + 1 } ."
215
+ )
216
+
217
+ @property
218
+ def short_message (self ) -> str :
219
+ """
220
+ A short-form error message
221
+ :returns: a str, the message
222
+ """
223
+ return f"Detection version in current build should be reduced to { self .previous_version + 1 } ."
0 commit comments