More code inspections!

This commit is contained in:
JustArchi
2021-05-06 17:14:03 +02:00
parent ae2713c0df
commit dfffc3384b
7 changed files with 149 additions and 44 deletions

View File

@@ -1,12 +1,12 @@
root = true
############################### ###############################
# Core EditorConfig Options # # Core EditorConfig Options #
############################### ###############################
root = true
[*] [*]
charset = utf-8 charset = utf-8
# TODO: file_header_template file_header_template = _ _ _ ____ _ _____\n / \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___\n / _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \\n / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |\n/_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|\n|\nCopyright 2015-$CURRENT_YEAR$ Łukasz "JustArchi" Domeradzki\nContact: JustArchi@JustArchi.net\n|\nLicensed under the Apache License, Version 2.0 (the "License");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n|\nhttp://www.apache.org/licenses/LICENSE-2.0\n|\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an "AS IS" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.
indent_style = tab indent_style = tab
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
@@ -16,53 +16,53 @@ trim_trailing_whitespace = true
############################### ###############################
[*.cs] [*.cs]
csharp_indent_block_contents = true:warning csharp_indent_block_contents = true
csharp_indent_braces = false:warning csharp_indent_braces = false
csharp_indent_case_contents = true:warning csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false:warning csharp_indent_case_contents_when_block = false
csharp_indent_labels = flush_left:warning csharp_indent_labels = flush_left
csharp_indent_switch_labels = true:warning csharp_indent_switch_labels = true
csharp_new_line_before_catch = false:warning csharp_new_line_before_catch = false
csharp_new_line_before_else = false:warning csharp_new_line_before_else = false
csharp_new_line_before_finally = false:warning csharp_new_line_before_finally = false
csharp_new_line_before_members_in_anonymous_types = false:warning csharp_new_line_before_members_in_anonymous_types = false
csharp_new_line_before_members_in_object_initializers = false:warning csharp_new_line_before_members_in_object_initializers = false
csharp_new_line_before_open_brace = none:warning csharp_new_line_before_open_brace = none
csharp_new_line_between_query_expression_clauses = false:warning csharp_new_line_between_query_expression_clauses = false
csharp_prefer_braces = true:warning csharp_prefer_braces = true:warning
csharp_prefer_simple_default_expression = true:warning csharp_prefer_simple_default_expression = true:warning
csharp_prefer_simple_using_statement = true:warning csharp_prefer_simple_using_statement = true:warning
csharp_prefer_static_local_function = true:warning csharp_prefer_static_local_function = true:warning
csharp_preferred_modifier_order = public,protected,internal,private,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning csharp_preferred_modifier_order = public, protected, internal, private, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:warning
csharp_preserve_single_line_blocks = true:warning csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = false:warning csharp_preserve_single_line_statements = false
csharp_space_after_cast = true:warning csharp_space_after_cast = true
csharp_space_after_colon_in_inheritance_clause = true:warning csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true:warning csharp_space_after_comma = true
csharp_space_after_dot = false:warning csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true:warning csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true:warning csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after:warning csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false:warning csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true:warning csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false:warning csharp_space_before_comma = false
csharp_space_before_dot = false:warning csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false:warning csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false:warning csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false:warning csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false:warning csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false:warning csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false:warning csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false:warning csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false:warning csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false:warning csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = none:warning csharp_space_between_parentheses = none
csharp_space_between_square_brackets = false:warning csharp_space_between_square_brackets = false
csharp_style_conditional_delegate_call = true:warning csharp_style_conditional_delegate_call = true:warning
csharp_style_deconstructed_variable_declaration = true:warning csharp_style_deconstructed_variable_declaration = true:warning
@@ -98,11 +98,38 @@ csharp_style_var_elsewhere = false:warning
csharp_style_var_for_built_in_types = false:warning csharp_style_var_for_built_in_types = false:warning
csharp_style_var_when_type_is_apparent = false:warning csharp_style_var_when_type_is_apparent = false:warning
csharp_using_directive_placement = outside_namespace:warning csharp_using_directive_placement = outside_namespace
[*.{cs,vb}] [*.{cs,vb}]
dotnet_analyzer_diagnostic.severity = warning
dotnet_code_quality_unused_parameters = all:warning dotnet_code_quality_unused_parameters = all:warning
# TODO - one at a time
dotnet_diagnostic.ca1002.severity = silent
dotnet_diagnostic.ca1027.severity = silent
dotnet_diagnostic.ca1028.severity = silent
dotnet_diagnostic.ca1031.severity = silent
dotnet_diagnostic.ca1034.severity = silent
dotnet_diagnostic.ca1044.severity = silent
dotnet_diagnostic.ca1054.severity = silent
dotnet_diagnostic.ca1062.severity = silent
dotnet_diagnostic.ca1063.severity = silent
dotnet_diagnostic.ca1303.severity = silent
dotnet_diagnostic.ca1307.severity = silent
dotnet_diagnostic.ca1308.severity = silent
dotnet_diagnostic.ca1508.severity = silent
dotnet_diagnostic.ca1819.severity = silent
dotnet_diagnostic.ca1812.severity = silent
dotnet_diagnostic.ca1823.severity = silent
dotnet_diagnostic.ca2000.severity = silent
dotnet_diagnostic.ca2002.severity = silent
dotnet_diagnostic.ca3003.severity = silent
dotnet_diagnostic.ca3012.severity = silent
dotnet_diagnostic.ca3075.severity = silent
dotnet_diagnostic.ca5389.severity = silent
dotnet_diagnostic.ca5392.severity = silent
dotnet_diagnostic.ca5394.severity = silent
# Rule - almost everything # Rule - almost everything
dotnet_naming_rule.almost_everything_must_be_pascal_case.severity = warning dotnet_naming_rule.almost_everything_must_be_pascal_case.severity = warning
dotnet_naming_rule.almost_everything_must_be_pascal_case.style = pascal_case dotnet_naming_rule.almost_everything_must_be_pascal_case.style = pascal_case
@@ -154,8 +181,8 @@ dotnet_naming_symbols.type_parameters.applicable_kinds = type_parameter
dotnet_naming_symbols.type_parameters.applicable_accessibilities = * dotnet_naming_symbols.type_parameters.applicable_accessibilities = *
dotnet_remove_unnecessary_suppression_exclusions = none:warning dotnet_remove_unnecessary_suppression_exclusions = none:warning
dotnet_separate_import_directive_groups = false:warning dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true:warning dotnet_sort_system_directives_first = true
dotnet_style_coalesce_expression = true:warning dotnet_style_coalesce_expression = true:warning
dotnet_style_collection_initializer = true:warning dotnet_style_collection_initializer = true:warning

View File

@@ -0,0 +1,24 @@
// _ _ _ ____ _ _____
// / \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
// / _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// |
// http://www.apache.org/licenses/LICENSE-2.0
// |
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
[assembly: CLSCompliant(false)]

View File

@@ -0,0 +1,24 @@
// _ _ _ ____ _ _____
// / \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
// / _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// |
// http://www.apache.org/licenses/LICENSE-2.0
// |
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
[assembly: CLSCompliant(false)]

View File

@@ -0,0 +1,24 @@
// _ _ _ ____ _ _____
// / \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
// / _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
// |
// Copyright 2015-2021 Łukasz "JustArchi" Domeradzki
// Contact: JustArchi@JustArchi.net
// |
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// |
// http://www.apache.org/licenses/LICENSE-2.0
// |
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
using System;
[assembly: CLSCompliant(false)]

View File

@@ -19,6 +19,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
[assembly: CLSCompliant(false)]
[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)] [assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]

View File

@@ -19,7 +19,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
[assembly: CLSCompliant(false)]
[assembly: InternalsVisibleTo("ArchiSteamFarm.Tests")] [assembly: InternalsVisibleTo("ArchiSteamFarm.Tests")]
[assembly: InternalsVisibleTo("ArchiSteamFarm.OfficialPlugins.SteamTokenDumper")] [assembly: InternalsVisibleTo("ArchiSteamFarm.OfficialPlugins.SteamTokenDumper")]

View File

@@ -4,6 +4,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<ApplicationIcon>../resources/ASF.ico</ApplicationIcon> <ApplicationIcon>../resources/ASF.ico</ApplicationIcon>
<Authors>JustArchi</Authors> <Authors>JustArchi</Authors>
<Company>JustArchiNET</Company> <Company>JustArchiNET</Company>
@@ -13,6 +14,7 @@
<ErrorReport>none</ErrorReport> <ErrorReport>none</ErrorReport>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<NeutralLanguage>en</NeutralLanguage>
<NoWarn>1591</NoWarn> <NoWarn>1591</NoWarn>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<PackageIcon>../resources/ASF.ico</PackageIcon> <PackageIcon>../resources/ASF.ico</PackageIcon>