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

Send warning to client on CRLF line endings #717

Merged
merged 1 commit into from
May 14, 2024
Merged

Send warning to client on CRLF line endings #717

merged 1 commit into from
May 14, 2024

Conversation

anderseknert
Copy link
Member

In case either opa-fmt or use-rego-v1 is enabled, we'll send back a warning to the client whenever they save a document containing CRLF line endings. This to avoid confusion when the user tries to fix formatting using opa fmt, but the editor adding back CRLF line endings after.

Also disable the nestif linter, as it's annoying.

Fixes #693

In case either `opa-fmt` or `use-rego-v1` is enabled, we'll send back
a warning to the client whenever they save a document containing CRLF
line endings. This to avoid confusion when the user tries to fix formatting
using `opa fmt`, but the editor adding back CRLF line endings after.

Also disable the nestif linter, as it's annoying.

Fixes #693

Signed-off-by: Anders Eknert <[email protected]>
internal/lsp/server.go Show resolved Hide resolved
@anderseknert anderseknert merged commit 00ea15e into main May 14, 2024
3 checks passed
@anderseknert anderseknert deleted the crlf-warn branch May 14, 2024 12:17
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
In case either `opa-fmt` or `use-rego-v1` is enabled, we'll send back
a warning to the client whenever they save a document containing CRLF
line endings. This to avoid confusion when the user tries to fix formatting
using `opa fmt`, but the editor adding back CRLF line endings after.

Also disable the nestif linter, as it's annoying.

Fixes StyraInc#693

Signed-off-by: Anders Eknert <[email protected]>
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.

Better handling of CRLF
2 participants