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

check-script-ref-and-source erroneously checks refs in comments #194

Open
vholmer opened this issue Mar 7, 2024 · 0 comments
Open

check-script-ref-and-source erroneously checks refs in comments #194

vholmer opened this issue Mar 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vholmer
Copy link

vholmer commented Mar 7, 2024

Describe the bug
When running check-script-ref-and-source on a model containing a comment which itself contains a ref the pre-commit will check if this referenced model exists. If it's in a comment it should disregard that model.

To Reproduce

-- In the future this will be {{ ref('future_model') }}
select * from {{ ref('current_model') }}

Fails with:

- hook id: check-script-ref-and-source
- exit code: 1

Missing model (ref) future_model

Expected behavior
Any ref in comment should be disregarded by check-script-ref-and-source.

Version:
v1.2.0

@vholmer vholmer added the bug Something isn't working label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant