Trivadis/plsql-formatter-settings

Make exclusion list OS independent

PhilippSalvisberg opened this issue · 3 comments

The ignore file seems to be OS specific. I've got informed that on Windows you need to use \\ as a file separator.

It would help if the entries could be OS independent (e.g. convert forward slashes to the OS specific file separator automatically).

Furthermore the configuration in the pre-commit hook should be simplified (with an example).

ignore is an optional parameter. Optional parameters can be added to FORMATTER_OPTS when required in the pre-commit hook when required.

So, the pre-commit hook is left "as is", this means without an example for the ignore parameter.

Tested on Windows. Works with forward slash. So that's the recommend way. Changing existing blackslash to forward slash.

Escaping the backslash (\\) for a single backslash will not be supported in the ignore file anymore. This way the original UNC path can be used in the ignore file, for example:

\\Mac\AllFiles\Users\phs\github\trivadis\plsql-formatter-settings\standalone\target\database\demo\demo_script\00_demo_readme.sql