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

Don't check macros in check-model hooks #18

Conversation

PabloPardoGarcia
Copy link
Contributor

@PabloPardoGarcia PabloPardoGarcia commented Apr 3, 2021

This PR attempts to fix #14 and fix #17 , it prevents macro SQL files from being selected by the hooks check-model.

My idea with this changes is to remove the checks on macros in the hooks check-model- and ideally create specific hooks for macros, such as check-macro-has-description. I can create PR with the macro hooks @tomsej

@codecov-io
Copy link

codecov-io commented Apr 3, 2021

Codecov Report

Merging #18 (15569af) into main (607cb07) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #18   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           38        38           
  Lines         1597      1607   +10     
  Branches       210       212    +2     
=========================================
+ Hits          1597      1607   +10     
Impacted Files Coverage Δ
pre_commit_dbt/check_model_columns_have_desc.py 100.00% <100.00%> (ø)
pre_commit_dbt/check_model_has_all_columns.py 100.00% <100.00%> (ø)
pre_commit_dbt/check_model_has_description.py 100.00% <100.00%> (ø)
pre_commit_dbt/check_model_has_meta_keys.py 100.00% <100.00%> (ø)
pre_commit_dbt/check_model_has_properties_file.py 100.00% <100.00%> (ø)
pre_commit_dbt/check_model_has_tests.py 100.00% <100.00%> (ø)
pre_commit_dbt/check_model_has_tests_by_group.py 100.00% <100.00%> (ø)
pre_commit_dbt/check_model_has_tests_by_name.py 100.00% <100.00%> (ø)
pre_commit_dbt/check_model_has_tests_by_type.py 100.00% <100.00%> (ø)
pre_commit_dbt/check_model_parents_and_childs.py 100.00% <100.00%> (ø)
... and 2 more

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 607cb07...15569af. Read the comment docs.

@PabloPardoGarcia PabloPardoGarcia changed the title black formatting Don't check macros in check-model-has-description Apr 3, 2021
@PabloPardoGarcia PabloPardoGarcia changed the title Don't check macros in check-model-has-description Don't check macros in check-model hooks Apr 3, 2021
Copy link
Contributor

@tomsej tomsej left a comment

Choose a reason for hiding this comment

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

Great work @PabloPardoGarcia thanks a lot for the contribution! I really appreciate it 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants