Skip to content

Commit

Permalink
Clarify refactoring & nuget items; no major changes
Browse files Browse the repository at this point in the history
  • Loading branch information
unquietwiki committed Jan 17, 2022
1 parent a05edef commit eb3093a
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 6 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ indent_size = 2
# Dotnet code style settings:
[*.{cs,vb}]

# https://github.com/JosefPihrt/Roslynator/blob/master/src/Analyzers/README.md
# https://github.com/JosefPihrt/Roslynator/blob/master/src/Analyzers/Analyzers.xml
roslynator_accessibility_modifiers = explicit
roslynator_enum_has_flag_style = operator
roslynator_empty_string_style = literal
roslynator_object_creation_parentheses_style = omit
roslynator_null_check_style = equality_operator
roslynator_array_creation_type_style = explicit
roslynator_object_creation_type_style = explicit

# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = warning

Expand Down
27 changes: 27 additions & 0 deletions GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("Style","IDE0055:Fix formatting")]
[assembly: SuppressMessage("CodeQuality","IDE0079:Remove unnecessary suppression")]
[assembly: SuppressMessage("Style","IDE1006:Naming Styles")]
[assembly: SuppressMessage("Style","RCS1002:Remove braces.")]
[assembly: SuppressMessage("Style","RCS1004:Remove braces from if-else.")]
[assembly: SuppressMessage("Style","RCS1007:Add braces.")]
[assembly: SuppressMessage("Readability", "RCS1009:Use explicit type instead of 'var' (foreach variable).")]
[assembly: SuppressMessage("Simplification","RCS1010:Use 'var' instead of explicit type (when the type is obvious).")]
[assembly: SuppressMessage("Usage", "RCS1016:Convert block body to expression-body (or vice versa).")]
[assembly: SuppressMessage("Naming","RCS1045:Rename private field to camel case with underscore.")]
[assembly: SuppressMessage("Readability", "RCS1052:Declare each attribute separately.")]
[assembly: SuppressMessage("Readability", "RCS1056:Avoid usage of using alias directive.")]
[assembly: SuppressMessage("Maintainability","RCS1060:Declare each type in separate file.")]
[assembly: SuppressMessage("Style","RCS1064:Avoid usage of for statement to create an infinite loop.")]
[assembly: SuppressMessage("Formatting", "RCS1100:Format documentation summary on a single line.")]
[assembly: SuppressMessage("Style","RCS1111:Add braces to switch section with multiple statements.")]
[assembly: SuppressMessage("Style","RCS1126:Add braces to if-else.")]
[assembly: SuppressMessage("Readability","RCS1162:Avoid chain of assignments.")]
[assembly: SuppressMessage("Simplification","RCS1176:Use 'var' instead of explicit type (when the type is not obvious).")]
[assembly: SuppressMessage("Simplification", "RCS1177:Use 'var' instead of explicit type (in foreach).")]
[assembly: SuppressMessage("Usage","RCS1223:Mark publicly visible type with DebuggerDisplay attribute.")]
4 changes: 2 additions & 2 deletions MechJeb2/MechJeb2.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Net.Compilers.4.0.1\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.4.0.1\build\Microsoft.Net.Compilers.props')" />
<Import Project="..\packages\Microsoft.Net.Compilers.Toolset.4.0.1\build\Microsoft.Net.Compilers.Toolset.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.Toolset.4.0.1\build\Microsoft.Net.Compilers.Toolset.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -334,7 +334,7 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.4.0.1\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.4.0.1\build\Microsoft.Net.Compilers.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.Toolset.4.0.1\build\Microsoft.Net.Compilers.Toolset.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.Toolset.4.0.1\build\Microsoft.Net.Compilers.Toolset.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
2 changes: 1 addition & 1 deletion MechJeb2/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Net.Compilers" version="4.0.1" targetFramework="net48" developmentDependency="true" />
<package id="Microsoft.Net.Compilers.Toolset" version="4.0.1" targetFramework="net48" developmentDependency="true" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
</packages>
7 changes: 5 additions & 2 deletions MechJeb2Tests/MechJeb2Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.Net.Compilers.Toolset.4.0.1\build\Microsoft.Net.Compilers.Toolset.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.Toolset.4.0.1\build\Microsoft.Net.Compilers.Toolset.props')" />
<Import Project="..\packages\xunit.runner.visualstudio.2.4.3\build\net452\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.4.3\build\net452\xunit.runner.visualstudio.props')" />
<Import Project="..\packages\xunit.runner.console.2.4.1\build\xunit.runner.console.props" Condition="Exists('..\packages\xunit.runner.console.2.4.1\build\xunit.runner.console.props')" />
<Import Project="..\packages\xunit.core.2.4.1\build\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.4.1\build\xunit.core.props')" />
<Import Project="..\packages\Microsoft.Net.Compilers.4.0.1\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.4.0.1\build\Microsoft.Net.Compilers.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -42,6 +42,9 @@
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.4.1\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="FunicularSwitch, Version=3.0.0.0, Culture=neutral, PublicKeyToken=f56e2e2ffbdf0cd3, processorArchitecture=MSIL">
<HintPath>..\packages\FunicularSwitch.3.0.2\lib\netstandard2.0\FunicularSwitch.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NSubstitute, Version=4.2.0.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
<HintPath>..\packages\NSubstitute.4.2.2\lib\net46\NSubstitute.dll</HintPath>
Expand Down Expand Up @@ -100,11 +103,11 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.4.0.1\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.4.0.1\build\Microsoft.Net.Compilers.props'))" />
<Error Condition="!Exists('..\packages\xunit.core.2.4.1\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.4.1\build\xunit.core.props'))" />
<Error Condition="!Exists('..\packages\xunit.core.2.4.1\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.4.1\build\xunit.core.targets'))" />
<Error Condition="!Exists('..\packages\xunit.runner.console.2.4.1\build\xunit.runner.console.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.console.2.4.1\build\xunit.runner.console.props'))" />
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.4.3\build\net452\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.4.3\build\net452\xunit.runner.visualstudio.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.Toolset.4.0.1\build\Microsoft.Net.Compilers.Toolset.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.Toolset.4.0.1\build\Microsoft.Net.Compilers.Toolset.props'))" />
</Target>
<Import Project="..\packages\xunit.core.2.4.1\build\xunit.core.targets" Condition="Exists('..\packages\xunit.core.2.4.1\build\xunit.core.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
3 changes: 2 additions & 1 deletion MechJeb2Tests/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Castle.Core" version="4.4.1" targetFramework="net48" />
<package id="Microsoft.Net.Compilers" version="4.0.1" targetFramework="net48" developmentDependency="true" />
<package id="FunicularSwitch" version="3.0.2" targetFramework="net48" />
<package id="Microsoft.Net.Compilers.Toolset" version="4.0.1" targetFramework="net48" developmentDependency="true" />
<package id="NSubstitute" version="4.2.2" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net48" />
Expand Down

0 comments on commit eb3093a

Please sign in to comment.