Skip to content

Commit

Permalink
Final StyleCop fixes (#60)
Browse files Browse the repository at this point in the history
fixes #47
  • Loading branch information
ErikEJ authored Jan 22, 2025
1 parent 867a217 commit a5c45b2
Show file tree
Hide file tree
Showing 119 changed files with 205 additions and 98 deletions.
4 changes: 0 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,5 @@ guidelines = 120
##########################################
[*.{cs,csx,cake,razor}]
dotnet_diagnostic.CA1062.severity = none # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/MicrosoftCodeAnalysis/CA1062.md
dotnet_diagnostic.CA1812.severity = none # https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1812
dotnet_diagnostic.SA1516.severity = none # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1516.md
dotnet_diagnostic.SA1518.severity = none # https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1518.md
csharp_style_namespace_declarations = file_scoped:warning

dotnet_diagnostic.CS1591.severity = none
3 changes: 3 additions & 0 deletions SqlServer.Dac/DataTypeView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ public DataTypeView(string name, DataTypeReference dataType, DataTypeViewType ty
}

public string Name { get; set; }

public string DataType { get; set; }

public DataTypeViewType Type { get; set; }

public int Length { get; set; }

public override string ToString()
Expand Down
2 changes: 2 additions & 0 deletions SqlServer.Dac/Visitors/AlterProcedureVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ namespace SqlServer.Dac.Visitors
public class AlterProcedureVisitor : BaseVisitor, IVisitor<AlterProcedureStatement>
{
public ObjectTypeFilter TypeFilter { get; set; } = ObjectTypeFilter.All;

public IList<AlterProcedureStatement> Statements { get; } = new List<AlterProcedureStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
2 changes: 2 additions & 0 deletions SqlServer.Dac/Visitors/AlterTableVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ namespace SqlServer.Dac.Visitors
public class AlterTableVisitor : BaseVisitor, IVisitor<AlterTableStatement>
{
public ObjectTypeFilter TypeFilter { get; set; } = ObjectTypeFilter.All;

public IList<AlterTableStatement> Statements { get; } = new List<AlterTableStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/BinaryExpressionVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class BinaryExpressionVisitor : BaseVisitor, IVisitor<BinaryExpression>
{
public IList<BinaryExpression> Statements { get; } = new List<BinaryExpression>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/BooleanBinaryExpressionVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class BooleanBinaryExpressionVisitor : BaseVisitor, IVisitor<BooleanBinaryExpression>
{
public IList<BooleanBinaryExpression> Statements { get; } = new List<BooleanBinaryExpression>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/BooleanComparisonVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class BooleanComparisonVisitor : BaseVisitor, IVisitor<BooleanComparisonExpression>
{
public IList<BooleanComparisonExpression> Statements { get; } = new List<BooleanComparisonExpression>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/BooleanExpressionVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class BooleanExpressionVisitor : BaseVisitor, IVisitor<BooleanExpression>
{
public IList<BooleanExpression> Statements { get; } = new List<BooleanExpression>();

public int Count
{
get { return Statements.Count; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class BooleanParenthesesExpressionVisitor : BaseVisitor, IVisitor<BooleanParenthesisExpression>
{
public IList<BooleanParenthesisExpression> Statements { get; } = new List<BooleanParenthesisExpression>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/CastCallVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class CastCallVisitor : BaseVisitor, IVisitor<CastCall>
{
public IList<CastCall> Statements { get; } = new List<CastCall>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/CloseCursorVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class CloseCursorVisitor : BaseVisitor, IVisitor<CloseCursorStatement>
{
public IList<CloseCursorStatement> Statements { get; } = new List<CloseCursorStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/ColumnDefinitionVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class ColumnDefinitionVisitor : BaseVisitor, IVisitor<ColumnDefinition>
{
public IList<ColumnDefinition> Statements { get; } = new List<ColumnDefinition>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/ColumnReferenceExpressionVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class ColumnReferenceExpressionVisitor : BaseVisitor, IVisitor<ColumnReferenceExpression>
{
public IList<ColumnReferenceExpression> Statements { get; } = new List<ColumnReferenceExpression>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/ConvertCallVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class ConvertCallVisitor : BaseVisitor, IVisitor<ConvertCall>
{
public IList<ConvertCall> Statements { get; } = new List<ConvertCall>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/CreateFunctionVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class CreateFunctionVisitor : BaseVisitor, IVisitor<CreateFunctionStatement>
{
public IList<CreateFunctionStatement> Statements { get; } = new List<CreateFunctionStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
2 changes: 2 additions & 0 deletions SqlServer.Dac/Visitors/CreateIndexStatementVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ namespace SqlServer.Dac.Visitors
public class CreateIndexStatementVisitor : BaseVisitor, IVisitor<CreateIndexStatement>
{
public ObjectTypeFilter TypeFilter { get; set; } = ObjectTypeFilter.All;

public IList<CreateIndexStatement> Statements { get; } = new List<CreateIndexStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/CreateLoginVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class CreateLoginVisitor : BaseVisitor, IVisitor<CreateLoginStatement>
{
public IList<CreateLoginStatement> Statements { get; } = new List<CreateLoginStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
2 changes: 2 additions & 0 deletions SqlServer.Dac/Visitors/CreateOrAlterProcedureVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ namespace SqlServer.Dac.Visitors
public class CreateOrAlterProcedureVisitor : BaseVisitor, IVisitor<CreateOrAlterProcedureStatement>
{
public ObjectTypeFilter TypeFilter { get; set; } = ObjectTypeFilter.All;

public IList<CreateOrAlterProcedureStatement> Statements { get; } = new List<CreateOrAlterProcedureStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
2 changes: 2 additions & 0 deletions SqlServer.Dac/Visitors/CreateProcedureVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ namespace SqlServer.Dac.Visitors
public class CreateProcedureVisitor : BaseVisitor, IVisitor<CreateProcedureStatement>
{
public ObjectTypeFilter TypeFilter { get; set; } = ObjectTypeFilter.All;

public IList<CreateProcedureStatement> Statements { get; } = new List<CreateProcedureStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/CreateRoleVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class CreateRoleVisitor : BaseVisitor, IVisitor<CreateRoleStatement>
{
public IList<CreateRoleStatement> Statements { get; } = new List<CreateRoleStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
2 changes: 2 additions & 0 deletions SqlServer.Dac/Visitors/CreateTableVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ namespace SqlServer.Dac.Visitors
public class CreateTableVisitor : BaseVisitor, IVisitor<CreateTableStatement>
{
public ObjectTypeFilter TypeFilter { get; set; } = ObjectTypeFilter.All;

public IList<CreateTableStatement> Statements { get; } = new List<CreateTableStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/CreateUserVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class CreateUserVisitor : BaseVisitor, IVisitor<CreateUserStatement>
{
public IList<CreateUserStatement> Statements { get; } = new List<CreateUserStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/DataModificationStatementVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class DataModificationStatementVisitor : BaseVisitor, IVisitor<DataModificationStatement>
{
public IList<DataModificationStatement> Statements { get; } = new List<DataModificationStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/DataTypeReferenceVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class DataTypeReferenceVisitor : BaseVisitor, IVisitor<DataTypeReference>
{
public IList<DataTypeReference> Statements { get; } = new List<DataTypeReference>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/DeallocateCursorVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class DeallocateCursorVisitor : BaseVisitor, IVisitor<DeallocateCursorStatement>
{
public IList<DeallocateCursorStatement> Statements { get; } = new List<DeallocateCursorStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/DeclareVariableElementVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class DeclareVariableElementVisitor : BaseVisitor, IVisitor<DeclareVariableElement>
{
public IList<DeclareVariableElement> Statements { get; } = new List<DeclareVariableElement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/DeleteVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class DeleteVisitor : BaseVisitor, IVisitor<DeleteStatement>
{
public IList<DeleteStatement> Statements { get; } = new List<DeleteStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/ExecutableStringListVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class ExecutableStringListVisitor : BaseVisitor, IVisitor<ExecutableStringList>
{
public IList<ExecutableStringList> Statements { get; } = new List<ExecutableStringList>();

public int Count
{
get { return Statements.Count; }
Expand Down
2 changes: 2 additions & 0 deletions SqlServer.Dac/Visitors/ExecuteVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace SqlServer.Dac.Visitors
public class ExecuteVisitor : BaseVisitor, IVisitor<ExecuteStatement>
{
private readonly IList<string> procNames;

public ExecuteVisitor()
{
procNames = new List<string>();
Expand All @@ -19,6 +20,7 @@ public ExecuteVisitor(params string[] procNames)
}

public IList<ExecuteStatement> Statements { get; } = new List<ExecuteStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/FromClauseVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class FromClauseVisitor : BaseVisitor, IVisitor<FromClause>
{
public IList<FromClause> Statements { get; } = new List<FromClause>();

public int Count
{
get { return Statements.Count; }
Expand Down
2 changes: 2 additions & 0 deletions SqlServer.Dac/Visitors/FunctionCallVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace SqlServer.Dac.Visitors
public class FunctionCallVisitor : BaseVisitor, IVisitor<FunctionCall>
{
private readonly IList<string> functionNames;

public FunctionCallVisitor()
{
functionNames = new List<string>();
Expand All @@ -18,6 +19,7 @@ public FunctionCallVisitor(params string[] functionNames)
}

public IList<FunctionCall> Statements { get; } = new List<FunctionCall>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/FunctionStatementBodyVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class FunctionStatementBodyVisitor : BaseVisitor, IVisitor<FunctionStatementBody>
{
public IList<FunctionStatementBody> Statements { get; } = new List<FunctionStatementBody>();

public int Count
{
get { return Statements.Count; }
Expand Down
2 changes: 2 additions & 0 deletions SqlServer.Dac/Visitors/GlobalVariableExpressionVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ namespace SqlServer.Dac.Visitors
public class GlobalVariableExpressionVisitor : BaseVisitor, IVisitor<GlobalVariableExpression>
{
private readonly IList<string> variableNames = new List<string>();

public IList<GlobalVariableExpression> Statements { get; } = new List<GlobalVariableExpression>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/GrantVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class GrantVisitor : BaseVisitor, IVisitor<GrantStatement>
{
public IList<GrantStatement> Statements { get; } = new List<GrantStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/ISNULLVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class ISNULLVisitor : BaseVisitor, IVisitor<NullIfExpression>
{
public IList<NullIfExpression> Statements { get; } = new List<NullIfExpression>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/IfStatementVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class IfStatementVisitor : BaseVisitor, IVisitor<IfStatement>
{
public IList<IfStatement> Statements { get; } = new List<IfStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/InPredicateVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class InPredicateVisitor : BaseVisitor, IVisitor<InPredicate>
{
public IList<InPredicate> Statements { get; } = new List<InPredicate>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/IndexDefinitionVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class IndexDefinitionVisitor : BaseVisitor, IVisitor<IndexDefinition>
{
public IList<IndexDefinition> Statements { get; } = new List<IndexDefinition>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/InsertStatementVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class InsertStatementVisitor : BaseVisitor, IVisitor<InsertStatement>
{
public IList<InsertStatement> Statements { get; } = new List<InsertStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/JoinVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace SqlServer.Dac.Visitors
public class JoinVisitor : BaseVisitor, IVisitor<JoinTableReference>
{
public IList<JoinTableReference> Statements { get; } = new List<JoinTableReference>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/LikePredicateVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class LikePredicateVisitor : BaseVisitor, IVisitor<LikePredicate>
{
public IList<LikePredicate> Statements { get; } = new List<LikePredicate>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/MergeStatementVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class MergeStatementVisitor : BaseVisitor, IVisitor<MergeStatement>
{
public IList<MergeStatement> Statements { get; } = new List<MergeStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
2 changes: 2 additions & 0 deletions SqlServer.Dac/Visitors/NamedTableReferenceVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ namespace SqlServer.Dac.Visitors
public class NamedTableReferenceVisitor : BaseVisitor, IVisitor<NamedTableReference>
{
public ObjectTypeFilter TypeFilter { get; set; } = ObjectTypeFilter.All;

public IList<NamedTableReference> Statements { get; } = new List<NamedTableReference>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/OpenCursorVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class OpenCursorVisitor : BaseVisitor, IVisitor<OpenCursorStatement>
{
public IList<OpenCursorStatement> Statements { get; } = new List<OpenCursorStatement>();

public int Count
{
get { return Statements.Count; }
Expand Down
1 change: 1 addition & 0 deletions SqlServer.Dac/Visitors/OrderByVisitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace SqlServer.Dac.Visitors
public class OrderByVisitor : BaseVisitor, IVisitor<OrderByClause>
{
public IList<OrderByClause> Statements { get; } = new List<OrderByClause>();

public int Count
{
get { return Statements.Count; }
Expand Down
Loading

0 comments on commit a5c45b2

Please sign in to comment.