Skip to content

Commit

Permalink
Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Shellyber committed Jun 10, 2024
1 parent 5aa8d90 commit ea5ec50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions demisto_sdk/commands/validate/tests/MR_validators_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ def test_ValidateSchemaFileExistsValidator_is_valid():
modeling_rule.schema_file.exist = False
results = ValidateSchemaFileExistsValidator().is_valid([modeling_rule])
assert (
"Packs/pack_0/ModelingRules/modelingrule_0/modelingrule_0.yml is missing a schema file."
in results[0].message
'The modeling rule "Duo Modeling Rule" is missing a schema file.'
== results[0].message
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ class ValidateSchemaFileExistsValidator(BaseValidator[ContentTypes]):
error_code = "MR100"
description = "Validate that each modeling rule has a corresponding schema file."
rationale = "For each modeling rule, there has to be schema file."
error_message = "The modeling rule {0} is missing a schema file."
error_message = 'The modeling rule "{0}" is missing a schema file.'
related_field = "modeling rule"
is_auto_fixable = False

def is_valid(self, content_items: Iterable[ContentTypes]) -> List[ValidationResult]:
return [
ValidationResult(
validator=self,
message=self.error_message.format(content_item.path),
message=self.error_message.format(content_item.name),
content_object=content_item,
)
for content_item in content_items
Expand Down

0 comments on commit ea5ec50

Please sign in to comment.