DapperLib / DapperAOT

Build time tools in the flavor of Dapper
Other
349 stars 19 forks source link

analyzer: Warn about potentially incorrect pseudo-positional arguments processing #118

Closed DeagleGross closed 1 month ago

DeagleGross commented 3 months ago

Dapper.Vanilla will incorrectly process ? symbol assuming its a syntax for pseudo-positional arguments even when it is used in the SQL string. I.e:

select 'this ?looks? like pseudo-positional'

Added the processing step for StringLiteral in TSqlProcessor where we report a diagnostic only if criterias below are met: 1) string contains 2 question marks 2) string contains 2 question marks in AsciiStringLiteral only 3) CompiledRegex.PseudoPositional regex returns true

IIRC we decided not to report diagnostic for OLE Db smell check.

Closes #60

DeagleGross commented 2 months ago

TODO: