forked from mojtabakaviani/sqltools
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I find myself getting a lot of false positives in regards to strings being detected as SQL when they are not. I'm not sure how much of an undertaking this would be, but it might be nice to have an opt-in mode that only activates syntax highlighting and suggestions if the property/parameter/field is annotated with StringSyntaxAttribute.
[StringSyntax("SQL")]
public const string GetEmployeesByJobTitleQuery = """
SELECT * FROM [dbo].[Employees]
WHERE JobTitle = @JobTitle
""";This would not work for variables declared within messages, since these cannot be annotated, and I'm not sure how best to handle that scenario. One option is to have a child toggle - if we opt in to using StringSyntaxAttribute, then we can choose whether standard detection is used for local variables or not.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels