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

Pre-format the document before passing it to KustoCodeService #7

Open
rosshamish opened this issue Jul 26, 2019 · 0 comments
Open

Pre-format the document before passing it to KustoCodeService #7

rosshamish opened this issue Jul 26, 2019 · 0 comments
Labels
feature New feature or request

Comments

@rosshamish
Copy link
Owner

The KustoCodeService chunks up a document in sometimes strange ways, which leads to odd document formatting. See JANK_CLEANUP.md for a couple examples of this.

The idea here would be to do a pre-formatting step where newlines are added or removed in certain places before passing the text on to the KustoCodeService, in a way so that the code service chunks it into blocks more logically.

For example,

  • when the document is a .create-or-alter statement
    • removing blank lines between the .create-or-alter command and the function name, or blank lines between the function name and the opening {.
    • adding a blank line between the opening { and the first query block
    • adding a blank line between the closing } and the preceding block
  • when the document has multiple blocks separated by semi-colons
    • adding a blank line after each semi-colon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant