Skip to content
Browse files

housekeeping: Added Code Analyzers (#1749)

Added StyleCop config
Added additional style cop analyzers to .ruleset
Removing stylecop fluff
Deviating from CoreFx style guide
Added XML Document generation
Added Analyzer overrides
- Added CA1507 as Warning
- Added CA1000 as None
- Added SA1400 as Error
- Added RCS1018 as Error
- Added RCS1507 as Error
- Added RCS1163 as Info
- Added SA1116 as Error
- Added RCS1139 as Error
- Added SA1626 as None
- Added RCS1001 as Error
- Added SA1503 as Error
- Added SA1513 as Error
- Added SA1127 as Error
- Added SA1614 as Error

Fixed SA1629
Fixed SX1309
Fixed IDE0040
Fixed SA1500
Fixed SA1400
Fixed SX1101
Fixed CA1507
Fixed RCS1057
Fixed RCS1037
Fixed RCS1139
Fixed RCS1001
Fixed SA1503
Fixed SA1500
Fixed SA1513
Fixed SA1107
Fixed SA1127
Fixed SX1101
Fixed SA1208
Fixed SX1101
Fixed SA1500
Fixed SA1107
Fixed RCS1037
Fixed SA1313
Fixed SA1300
Fixed SA1507
Fixed SA1001
Fixed SA1009
Fixed SA1001
Fixed SA1024
Fixed SA1027
Fixed SA1000
Fixed SA1137
Disabled SA1633
Fixed SA1611
Fixed SA1210
Fixed SA1614
Fixed SA1615
Fixed SA1117
Fixed CS1572
Fixed SA1616
Fixed SA1618
Fixed SA1622
Fixed SA1600
Fixed SA1401
Fixed SA1516
Fixed SA1518
Fixed SA1121
Fixed SX1101
Fixed SA1614
Fixed SA1121
Fixed RCS1037
Fixed SA1508
Fixed SA1501
Fixed RCS1207
Fixed RCS1211
Fixed SA1005
Fixed SA1303
Fixed SA1505
Fixed SA1512
Fixed CA1507
Fixed RCS1129
Fixed SA1515
Fixed SA1502

Added reactiveui.tests.ruleset
Moved Interactions
Moved Command Bindings
Moved Property Bindings
Moved Reactive Object
Moved Reactive Bindings
Moved Routing
Moved Reactive Command
Moved Interfaces
Moved Legacy Interfaces
Moved Scheduler
Move Property Classes
Moved Mixins
Moved Comparers
Moved Suspension
Moved Event Managers

Part of the work with commenting up the classes.

Further work on commenting. Moved some legacy classes into the Legacy

Further documentation.

Fix the analyzer reference.

Further documenting the classes.

Further work on commenting the classes.

Further updates to the comments.

Further comment work

Starting to fix the warnings on the branch.

Fix warnings
Update .editorconfig to match the new analyzers.

.EditorConfig now matches the new analyzers
More warning updates.

Added comments to ReactiveUI.XamForms

Futher work on eliminating warnings.

Further work on eliminating warnings.

Further work on eliminating warnings.

Eliminating warnings

Further fixing of warnings.

Moved standard compatible overloads.

Further warning updates.

Added comments to ReactiveUI.Fody

Added Android comments

added more android comments

Added additional comments

Added more comments

standardized RoutingState comments

cleared sa1600 errors

Event Builder clean up

Event builder comments

Added SA1600 to mustache

Added xml comments to mustache

Modified API approved text
  • Loading branch information...
RLittlesII committed Aug 29, 2018
1 parent 4e9bdcd commit 566db54c425767758ff6dded94ee9993cb6820ad
Showing 371 changed files with 21,147 additions and 12,744 deletions.
@@ -1,80 +1,155 @@
# EditorConfig is awesome:

# top-most EditorConfig file
root = true

# Don't use tabs for indentation.
# Default settings:
# A newline ending every file
# Use 4 spaces as indentation
insert_final_newline = true
indent_style = space
# (Please don't specify an indent_size here; that has too many unintended consequences.)

# Code files
indent_size = 4
insert_final_newline = true
charset = utf-8-bom

# Xml project files
indent_size = 2

# Xml config files
indent_size = 2
# C# files
# New line preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true

# JSON files
indent_size = 2
# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
csharp_indent_labels = one_less_than_current

# Dotnet code style settings:
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
# Avoid "this." and "Me." if not necessary
# avoid this. unless absolutely necessary
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion

# Use language keywords instead of framework type names for type references
# only use var when it's obvious what the variable type is
csharp_style_var_for_built_in_types = false:none
csharp_style_var_when_type_is_apparent = false:suggestion
csharp_style_var_elsewhere = false:suggestion

# use language keywords instead of BCL types
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion

# Suggest more modern language features when available
# name all constant fields using PascalCase
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields = pascal_case_style

dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const

dotnet_naming_style.pascal_case_style.capitalization = pascal_case

# static fields should have s_ prefix
dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static

dotnet_naming_style.static_prefix_style.capitalization = camel_case

# internal and private fields should be _camelCase
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields = camel_case_underscore_style

dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal

dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case

# Code style defaults
dotnet_sort_system_directives_first = true
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = false

# Expression-level preferences
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion

# CSharp code style settings:
# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion

# Prefer method-like constructs to have a block body
# Expression-bodied members
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_operators = false:none

# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties = true:none
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_indexers = true:none
csharp_style_expression_bodied_accessors = true:none

# Suggest more modern language features when available
# Pattern matching
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion

# Null checking preferences
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion

# Newline settings
csharp_new_line_before_open_brace = anonymous_types,accessors,object_collection_array_initalizers,methods,properties,types
csharp_new_line_before_else = false
csharp_new_line_before_catch = false
csharp_new_line_before_finally = false
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false

# C++ Files
curly_bracket_next_line = true
indent_brace_style = Allman

# Xml project files
indent_size = 2

# Xml build files
indent_size = 2

# Xml files
indent_size = 2

# Xml config files
indent_size = 2

# Shell scripts
end_of_line = lf
[*.{cmd, bat}]
end_of_line = crlf
@@ -0,0 +1,15 @@

<PackageReference Include="stylecop.analyzers" Version="1.1.0-beta009" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.1" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" Version="1.9.0" PrivateAssets="All" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects." ToolsVersion="15.0">
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
<Name Resource="MinimumRecommendedRules_Name" />
<Description Resource="MinimumRecommendedRules_Description" />
<Rules AnalyzerId="AsyncUsageAnalyzers" RuleNamespace="AsyncUsageAnalyzers">
<Rule Id="AvoidAsyncVoid" Action="Info" />
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1000" Action="None" />
<Rule Id="CA1030" Action="None" />
<Rule Id="CA1033" Action="None" />
<Rule Id="CA1001" Action="Warning" />
<Rule Id="CA1009" Action="Warning" />
<Rule Id="CA1016" Action="Warning" />
<Rule Id="CA1049" Action="Warning" />
<Rule Id="CA1060" Action="Warning" />
<Rule Id="CA1061" Action="Warning" />
<Rule Id="CA1063" Action="Warning" />
<Rule Id="CA1065" Action="Warning" />
<Rule Id="CA1301" Action="Warning" />
<Rule Id="CA1400" Action="Warning" />
<Rule Id="CA1401" Action="Warning" />
<Rule Id="CA1403" Action="Warning" />
<Rule Id="CA1404" Action="Warning" />
<Rule Id="CA1405" Action="Warning" />
<Rule Id="CA1410" Action="Warning" />
<Rule Id="CA1415" Action="Warning" />
<Rule Id="CA1507" Action="Warning" />
<Rule Id="CA1821" Action="Warning" />
<Rule Id="CA1900" Action="Warning" />
<Rule Id="CA1901" Action="Warning" />
<Rule Id="CA2002" Action="Warning" />
<Rule Id="CA2100" Action="Warning" />
<Rule Id="CA2101" Action="Warning" />
<Rule Id="CA2108" Action="Warning" />
<Rule Id="CA2111" Action="Warning" />
<Rule Id="CA2112" Action="Warning" />
<Rule Id="CA2114" Action="Warning" />
<Rule Id="CA2116" Action="Warning" />
<Rule Id="CA2117" Action="Warning" />
<Rule Id="CA2122" Action="Warning" />
<Rule Id="CA2123" Action="Warning" />
<Rule Id="CA2124" Action="Warning" />
<Rule Id="CA2126" Action="Warning" />
<Rule Id="CA2131" Action="Warning" />
<Rule Id="CA2132" Action="Warning" />
<Rule Id="CA2133" Action="Warning" />
<Rule Id="CA2134" Action="Warning" />
<Rule Id="CA2137" Action="Warning" />
<Rule Id="CA2138" Action="Warning" />
<Rule Id="CA2140" Action="Warning" />
<Rule Id="CA2141" Action="Warning" />
<Rule Id="CA2146" Action="Warning" />
<Rule Id="CA2147" Action="Warning" />
<Rule Id="CA2149" Action="Warning" />
<Rule Id="CA2200" Action="Warning" />
<Rule Id="CA2202" Action="Warning" />
<Rule Id="CA2207" Action="Warning" />
<Rule Id="CA2212" Action="Warning" />
<Rule Id="CA2213" Action="Warning" />
<Rule Id="CA2214" Action="Warning" />
<Rule Id="CA2216" Action="Warning" />
<Rule Id="CA2220" Action="Warning" />
<Rule Id="CA2229" Action="Warning" />
<Rule Id="CA2231" Action="Warning" />
<Rule Id="CA2232" Action="Warning" />
<Rule Id="CA2235" Action="Warning" />
<Rule Id="CA2236" Action="Warning" />
<Rule Id="CA2237" Action="Warning" />
<Rule Id="CA2238" Action="Warning" />
<Rule Id="CA2240" Action="Warning" />
<Rule Id="CA2241" Action="Warning" />
<Rule Id="CA2242" Action="Warning" />
<Rules AnalyzerId="Microsoft.CodeQuality.Analyzers" RuleNamespace="Microsoft.CodeQuality.Analyzers">
<Rule Id="CA1036" Action="None" />
<Rule Id="CA1056" Action="Info" />
<Rule Id="CA1710" Action="Info" />
<Rule Id="CA1724" Action="None" />
<Rule Id="CA1810" Action="None" />
<Rule Id="CA2007" Action="None" />
<Rules AnalyzerId="Roslynator.CSharp.Analyzers" RuleNamespace="Roslynator.CSharp.Analyzers">
<Rule Id="RCS1001" Action="Error" />
<Rule Id="RCS1055" Action="Warning" />
<Rule Id="RCS1062" Action="Warning" />
<Rule Id="RCS1066" Action="Warning" />
<Rule Id="RCS1069" Action="Warning" />
<Rule Id="RCS1071" Action="Warning" />
<Rule Id="RCS1074" Action="Warning" />
<Rule Id="RCS1090" Action="Warning" />
<Rule Id="RCS1018" Action="Error" />
<Rule Id="RCS1507" Action="Error" />
<Rule Id="RCS1037" Action="Error" />
<Rule Id="RCS1138" Action="Error" />
<Rule Id="RCS1139" Action="Error" />
<Rule Id="RCS1163" Action="Info" />
<Rule Id="RCS1168" Action="Info" />
<Rule Id="RCS1188" Action="Warning" />
<Rule Id="RCS1201" Action="Warning" />
<Rule Id="RCS1207" Action="Warning" />
<Rule Id="RCS1211" Action="Warning" />
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1107" Action="Error" />
<Rule Id="SA1101" Action="None" />
<Rule Id="SA1116" Action="Error" />
<Rule Id="SA1119" Action="Error" />
<Rule Id="SA1127" Action="Error" />
<Rule Id="SA1134" Action="Error" />
<Rule Id="SA1200" Action="None" />
<Rule Id="SA1202" Action="Warning" />
<Rule Id="SA1208" Action="Error" />
<Rule Id="SA1311" Action="None" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1400" Action="Error" />
<Rule Id="SA1405" Action="None" />
<Rule Id="SA1413" Action="None" />
<Rule Id="SA1500" Action="Error" />
<Rule Id="SA1503" Action="Error" />
<Rule Id="SA1513" Action="Error" />
<Rule Id="SA1600" Action="Error" />
<Rule Id="SA1614" Action="Error" />
<Rule Id="SA1616" Action="Error" />
<Rule Id="SA1622" Action="Error" />
<Rule Id="SA1623" Action="None" />
<Rule Id="SA1626" Action="None" />
<Rule Id="SA1633" Action="None" />
<Rule Id="SA1642" Action="None" />
<Rule Id="SA1629" Action="Error" />
<Rule Id="SX1101" Action="Error" />
<Rule Id="SX1309" Action="Error" />
<Rule Id="SX1623" Action="None" />
@@ -43,4 +43,5 @@
<SolutionDir Condition="'$(SolutionDir)' == ''">$(MSBuildThisFileDirectory)</SolutionDir>
<Import Project="..\" />
Oops, something went wrong.

0 comments on commit 566db54

Please sign in to comment.
You can’t perform that action at this time.