chore(sonar): hoist constant array literals to static readonly fields (CA1861)
Applied via `dotnet format analyzers --diagnostics CA1861 --severity info`,
plus manual cleanup:
- Renamed two cryptic fixer-generated field names:
- QueryBreakdownCollection.stringArray -> SnowflakeFunctionNames (and
inlined the now-redundant local alias)
- ExpressionObjectTests.arg2 -> NotInValues
- Deduped three identical `separator = ['\r','\n']` fields the fixer
emitted in the same test class (kept the first declaration; the other
two test methods now reuse it).
8 files touched.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
84b06557e5
commit
f5d539b906
+3
-1
@@ -243,12 +243,14 @@ public class QueryBreakdownExtensionsTests
|
||||
Assert.That(query.WithClauses[1].TableName, Is.EqualTo("recent_orders"));
|
||||
}
|
||||
|
||||
private static readonly string[] columns = new[] { "id", "name", "email" };
|
||||
|
||||
[Test]
|
||||
public void WithCte_WithColumnList_AddsCtesWithColumns()
|
||||
{
|
||||
// Arrange & Act
|
||||
var query = new QueryBreakdown()
|
||||
.WithCte("active_users", new[] { "id", "name", "email" }, cte => cte
|
||||
.WithCte("active_users", columns, cte => cte
|
||||
.Select("user_id, user_name, user_email")
|
||||
.From("users")
|
||||
.Where("status = 'active'"))
|
||||
|
||||
Reference in New Issue
Block a user