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

Swap to skip file if not found #3464

Merged
merged 1 commit into from
Jun 17, 2022
Merged

Conversation

alanmcruickshank
Copy link
Member

While testing 1.0.0 I found this quality of life bug.

While using the dbt templater, if you're not careful with the path specification you could accidentally specify files explicitly in your dependencies which aren't actually rendered (as I found out in brooklyn-data/dbt_artifacts#125). I don't think it's a bug but it does currently result in a fatal RuntimeError if sqlfluff tries to lint a file which isn't found.

I think this is the wrong behaviour and while we should still warn the user, the linting of the rest of the project should continue. Hence changing the error to SQLTemplaterSkipFile instead of RuntimeError.

Copy link
Member

@tunetheweb tunetheweb left a comment

Choose a reason for hiding this comment

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

Approved with one question

@codecov
Copy link

codecov bot commented Jun 17, 2022

Codecov Report

Merging #3464 (2005859) into main (8aa74a4) will not change coverage.
The diff coverage is n/a.

❗ Current head 2005859 differs from pull request most recent head 25a42b1. Consider uploading reports for the commit 25a42b1 to get more accurate results

@@            Coverage Diff            @@
##              main     #3464   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          171       171           
  Lines        12898     12898           
=========================================
  Hits         12898     12898           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8aa74a4...25a42b1. Read the comment docs.

@alanmcruickshank alanmcruickshank merged commit dfad1dd into main Jun 17, 2022
@alanmcruickshank alanmcruickshank deleted the ac/dbt-template-fileerror branch June 17, 2022 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants