We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92df032 commit 838002aCopy full SHA for 838002a
1 file changed
sqlmesh/core/linter/rules/builtin.py
@@ -62,11 +62,10 @@ class FilenameEqualsModelname(Rule):
62
63
def check_model(self, model: Model) -> t.Optional[RuleViolation]:
64
# Rule violated if the model's name (schema.table_name) does not match the file name (foo/bar/table_name.sql).
65
- full_model_name = model.name
66
- table_name = full_model_name.split(".")[-1]
67
- path = Path(model._path)
68
return (
69
- self.violation() if (table_name != path.stem) and not model.kind.is_symbolic else None
+ self.violation()
+ if (model.name.split(".")[-1] != Path(model._path).stem) and not model.kind.is_symbolic
+ else None
70
)
71
72
0 commit comments