looker-open-source / look-at-me-sideways

A style guide and linter for Looker's LookML data modeling language
MIT License
123 stars 37 forks source link

K1 should be 2 rules #179

Closed mariana-s-fernandes closed 2 months ago

mariana-s-fernandes commented 2 months ago

Since the latest changes in LAMS, it's raising an error for all my views since I don't follow the convention pk{n}_{key_name}...

In my view, these should be 2 separate rules: the first one to ensure all views have a primary key and the second one to follow that convention.

fabio-looker commented 2 months ago

Hi @mariana-s-fernandes

Since Looker checked for primary_key: yes in a view with it's biult-in validation, I did not initially have this rule in LAMS.

However, since LAMS v3, with all rules being opt-in, I do intend to add a rule for this, so I'll use this issue to track that.

In the meantime, this is fairly easy to specify as a custom rule. See this example: https://github.com/looker-open-source/look-at-me-sideways/blob/master/__tests__/dummy-projects/08-object-iteration-rules/manifest.lkml

mariana-s-fernandes commented 2 months ago

I have also checked and K7 does this separately, so all is good :) thanks!

fabio-looker commented 2 months ago

I guess "I do intend to" and "I already did" sometimes get jumbled up in my mind 😂 Thanks!