rspec/rules/S1481/tsql/rule.adoc
nicolas-gauthier-sonarsource 828e2d54cc
Modify S1481: Migrate to LaYC (#3245)
## Review

A dedicated reviewer checked the rule description successfully for:

- [x] logical errors and incorrect information
- [x] information gaps and missing content
- [x] text style and tone
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-10-13 11:59:36 +02:00

44 lines
751 B
Plaintext

include::../rationale.adoc[]
include::../how-to-fix-it.adoc[]
=== Code examples
==== Noncompliant code example
[source,sql,diff-id=1,diff-type=noncompliant]
----
DECLARE
@ClientId INT = 1, -- Noncompliant - @ClientId is unused
@DeliveryId INT = 0;
SELECT 'Date', 'Weight' FROM Claims WHERE Id = @DeliveryId;
GO
----
==== Compliant solution
[source,sql,diff-id=1,diff-type=compliant]
----
DECLARE
@DeliveryId INT = 0;
SELECT 'Date', 'Weight' FROM Claims WHERE Id = @DeliveryId;
GO
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]