Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rule: public models should have an example SQL query in their description #30

Merged
merged 2 commits into from
May 24, 2024

Conversation

matthieucan
Copy link
Contributor

No description provided.

@matthieucan matthieucan self-assigned this May 24, 2024
src/dbt_score/models.py Show resolved Hide resolved
if model.language == "sql" and model.access == "public":
if "```sql" not in model.description:
return RuleViolation(
"The model description does not include an example SQL query."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this one, what if users only document their models with a oneliner? So not with a full markdown document that is rendered in the docs? Then does the rule still make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case no - but that would be the incentive of dbt-score, to encourage such a practice?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok fair 👌 They can disable the rule if they really don't like it 😁

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, definitely. It has a low severity, so it can always be kept as a reminder to write model documentation ;)

@matthieucan matthieucan merged commit f68fff8 into master May 24, 2024
2 checks passed
@matthieucan matthieucan deleted the matthieucan/rule-description-example branch May 24, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants