tconbeer / sqlfmt

sqlfmt formats your dbt SQL files so you don't have to
https://sqlfmt.com
Apache License 2.0
373 stars 15 forks source link

--exclude option doesn't work on Windows #540

Closed cubeprodata closed 7 months ago

cubeprodata commented 7 months ago

Describe the bug --exclude option doesn't work for nested files - we noticed it only on Windows(works on Mac and Linux)

In the example below, file directly under excluded folder is ignored whilst file in a subfolder is not.

image

To Reproduce Create folder with subfolder and file in it.

Run sqlfmt . --exclude "./folder/**/*"

Expected behavior All files in excluded folder should be ignored

Actual behavior Files in excluded folder are formatted

Additional context What is the output of sqlfmt --version?

see on screenshot

What is the output of pip list (or pipx list if you installed using pipx)?

see on screenshot

tconbeer commented 7 months ago

Agreed. Duplicates #440