-
Notifications
You must be signed in to change notification settings - Fork 407
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
Make INLINE_MAX_LENGTH configurable #5
Comments
We know that we have the same issue jdorn/sql-formatter#59. I was thinking about keeping |
Add Typescript config fixes for Travis-CI
This is now configurable through the |
Quick question: I was trying to specify a global line length limit (similar to prettier's |
This option has been renamed to Perhaps you're interested in trying out a new SQL formatting tool that I've written, which does support the |
Thanks for the reply.
In theory yes, but I have a couple of requirements that brought me to the cmdline tool here....
2 is working great, except that there is no way to tell |
The only other feasible option that I know of is SQLFluff. But that one is really primarily a linter and not really that great of an option for completely reformatting SQL code. Though it does have a max_line_length option and it's auto-fixable. I'm planning to add Postgres support, but that will take time as Postgres is kinda big amongst SQL dialects. Transact-SQL is likely even more work as there are actually many dialects under this label and I find the syntax diagrams in Microsoft docs to be among the more confusing ones. However, currently Postgres support is definitely the most requested feature, so there's hope. |
This should clearly be configurable.
But the current implementation is a bit lacking. It considers the length of the parenthesized expression in isolation, but it should also consider the current indentation, because the whole point of it is really to limit how long the lines can be. By taking the indentation into the picture, we can name the config option to something like
maxLineLength
which would be instantly understandable, v/s something likemaxParenthesizedExpressionLength
.The text was updated successfully, but these errors were encountered: