You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue Trivadis/plsql-and-sql-coding-guidelines#130 describes a case where it would be beneficial to have the formatter to report errors in SQL code blocks of a Markdown file.
format.js reports errors in non-Markdown files by default (see https://github.com/Trivadis/plsql-formatter-settings/blob/sqldev-22.2.0/sqlcl/format.js#L522). However for Markdown files this feature is explicitly suppressed. The reason is, that not every SQL block in a Markdown file must be compatible with the Oracle dialect. However, I suggest to show the error by default and add an option to suppress the reporting of errors in files (in general).
The text was updated successfully, but these errors were encountered:
serr=<scope> scope of syntax errors to be reported. By default all errors are reported.
serr=none reports no syntax errors
serr=all reports all syntax errors
serr=ext reports syntax errors for files defined with ext option
serr=mext reports syntax errors for files defined with mext option
It's difficult to identify the code block with an error in a Markdown file. A solution would be to print the number of the SQL code block processed. Something like this:
Formatting file x of y: markdown.md... #1... done... #2... skipped... #3... done... done.
In this case 3 SQL blocks were processed. Block 1 and 3 where have been formatted. Block 2 has been skipped due to a syntax error.
The issue Trivadis/plsql-and-sql-coding-guidelines#130 describes a case where it would be beneficial to have the formatter to report errors in SQL code blocks of a Markdown file.
format.js
reports errors in non-Markdown files by default (see https://github.com/Trivadis/plsql-formatter-settings/blob/sqldev-22.2.0/sqlcl/format.js#L522). However for Markdown files this feature is explicitly suppressed. The reason is, that not every SQL block in a Markdown file must be compatible with the Oracle dialect. However, I suggest to show the error by default and add an option to suppress the reporting of errors in files (in general).The text was updated successfully, but these errors were encountered: