Skip to content

Match end of suffix against .sql and .sql.jinja #355

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

Merged
merged 3 commits into from
Jan 17, 2023
Merged

Match end of suffix against .sql and .sql.jinja #355

merged 3 commits into from
Jan 17, 2023

Conversation

ysmilda
Copy link
Contributor

@ysmilda ysmilda commented Jan 17, 2023

Closes #354

This allows to use the CLI against files which are named .{something}.sql and .{something}.sql.jinja.

I'll be the first to admit that I know nothing about python as a language, so there might be a better way of doing this. But it passes the tests and explains my issues goal.

Copy link
Owner

@tconbeer tconbeer left a comment

Choose a reason for hiding this comment

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

We need to add a test for this new behavior. You can modify this test:

def test_file_discovery(default_mode: Mode) -> None:

You'll have to add a file in the directory referenced in that test, maybe tests/data/unit_tests/test_api/test_file_discovery/a_directory/two.file.sql or similar.

We also need to add an item to CHANGELOG.md.

Once you have that done, I can add a commit to get the primer check to pass. Or if you prefer (let me know), I can just take it from here.

Thanks for contributing!

@ysmilda
Copy link
Contributor Author

ysmilda commented Jan 17, 2023

I've added the requested changes and the test and updated the changelog.

@tconbeer
Copy link
Owner

Thanks again for contributing, @ysmilda!

@tconbeer tconbeer merged commit f68ec43 into tconbeer:main Jan 17, 2023
@ysmilda ysmilda deleted the feat/#354/match-against-.sql branch January 17, 2023 18:50
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.

Match against files *.sql suffix
2 participants