-
Notifications
You must be signed in to change notification settings - Fork 11
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
Sanitize migrations and parse comment to disable specific statement validation #66
Conversation
Thank you for your suggestion. In my opinion, there is no need for a warning against disabling the language server because it is explicitly specified by the user. Currently, the whole file disable feature also don't output a warning. |
It's a fair point in the case of global disabling, etc. since it is always in the first document line. However, for statements that disabling line could be in the middle of a long file with lots of statements. In that case, I think it's helpful to open the file and instantly see there are warnings and where they are in the sidebar: however it's also true that some people will not want that. What about a |
Interesting idea! However, it is confusing to the user that the disable feature is treated as different levels for the entire file and for the separated statements. I would like to add the If you are using |
Recently, the settings have become more complicated, contrary to my preference. I understand that many users have different requirements, |
Perhaps it's a good idea to make statement settings independent, same as with Imagine I add This has the drawback of messier logic in the code in some situations (like figure out what diagnostics to show) but settings would be kept simple for the user if no optional features are used |
I agree statements options. And I propose this setting schema. {
"plpgsqlLanguageServer.diagnosticsLevels": {
"disableFlag": "ignore"
},
"plpgsqlLanguageServer.statements": {
"diagnosticsLevels": {
"disableFlag": "warning"
}
},
} What do you think? |
Yes, completely agree with that. |
What does this PR do?
(rather critical) Ensure migration files don't get actually executed by removing begin, commit and rollback.
As a workaround for Parameter values in INSERT #61 (and any other bug that arises), add an option to disable statements validation in the same way as the complete file
I believe the warning should be explicit as it is now since ideally this flag should not be used in any case and let the extension do its work
What issues does this PR fix or reference?
Is it tested? How?