Skip to content

Commit

Permalink
Move to Endjin.RecommendedPractices (#82)
Browse files Browse the repository at this point in the history
* Move to Endjin.RecommendedPractices

* Removed unnecessary elements from csproj files.

Co-authored-by: Jonathan George <Jonathan.George@endjin.com>
  • Loading branch information
jongeorge1 and jongeorge1 committed Mar 12, 2020
1 parent ca8a418 commit 325cb14
Show file tree
Hide file tree
Showing 38 changed files with 233 additions and 177 deletions.
10 changes: 10 additions & 0 deletions Solutions/.editorconfig
@@ -1,3 +1,10 @@
# Note: this file was added to your solution as a result of one or more projects using the Endjin.RecommendedPractices.Build.Common NuGet package.
# You can edit this file (e.g., to remove these comments), and it will not be updated - the package just checks for its presence, and copies
# this file. If you don't want this file (but you want to use the NuGet package that puts it here), add this setting to all projects
# using Endjin.RecommendedPractices.Build.Common:
# <EndjinDisableCodeAnalysis>true</EndjinDisableCodeAnalysis>
# and then delete this file. That setting will prevent the package from recreating this file.

# Code style rules for enforcing the endjin house style
# See: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
[*.cs]
Expand Down Expand Up @@ -68,3 +75,6 @@ dotnet_style_qualification_for_field = true:suggestion
dotnet_style_qualification_for_method = true:suggestion
dotnet_style_qualification_for_property = true:suggestion
dotnet_style_qualification_for_event = true:suggestion

# Style - using
csharp_using_directive_placement = inside_namespace:warning
6 changes: 0 additions & 6 deletions Solutions/Common.GitHub.proj

This file was deleted.

35 changes: 0 additions & 35 deletions Solutions/Common.NetStandard_2_0.proj

This file was deleted.

23 changes: 0 additions & 23 deletions Solutions/Common.NuGet.proj

This file was deleted.

Expand Up @@ -2,13 +2,23 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
<RootNamespace>Corvus.ContentHandling.Json.Specs</RootNamespace>
<!-- Disabling SA1204 because it prioritizes static/non-static over public/non-public, which doesn't fit very well
with bindings in SpecFlow.
Disabling SA1600, SA1602 (all public types and members to be documented) because test projects need to make lots of types
public for technical reasaons, but they are not meant for public consumption, so XML doc comments are only
appropriate if they aid understanding within the project.
-->
<NoWarn>SA0001;SA1204;SA1600;SA1602;CS1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Corvus.SpecFlow.Extensions" Version="0.6.0" />
<PackageReference Include="Endjin.RecommendedPractices" Version="0.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SpecFlow" Version="3.1.80" />
<PackageReference Include="SpecFlow.NUnit" Version="3.1.80" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.1.80" />
Expand Down
13 changes: 13 additions & 0 deletions Solutions/Corvus.ContentHandling.Json.Specs/GlobalSuppressions.cs
@@ -0,0 +1,13 @@
// <copyright file="GlobalSuppressions.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(
"StyleCop.CSharp.OrderingRules",
"SA1210:Using directives should be ordered alphabetically by namespace",
Justification = "We need this until https://github.com/SpecFlowOSS/SpecFlow/issues/1828 is fixed")]

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(
"StyleCop.CSharp.OrderingRules",
"SA1633:Using directives should be ordered alphabetically by namespace",
Justification = "We need this until https://github.com/SpecFlowOSS/SpecFlow/issues/1828 is fixed")]
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>

<PropertyGroup>
Expand All @@ -11,10 +12,12 @@
<PackageReleaseNotes></PackageReleaseNotes>
</PropertyGroup>

<Import Project="..\Common.NetStandard_2_0.proj" />

<ItemGroup>
<PackageReference Include="Corvus.Extensions.Newtonsoft.Json" Version="0.9.0" />
<PackageReference Include="Endjin.RecommendedPractices" Version="0.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="1.2.2" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
</ItemGroup>
Expand Down
Expand Up @@ -2,12 +2,21 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
<IsPackable>false</IsPackable>
<RootNamespace>Corvus.ContentHandling.Specs</RootNamespace>
<!-- Disabling SA1204 because it prioritizes static/non-static over public/non-public, which doesn't fit very well
with bindings in SpecFlow.
Disabling SA1600, SA1602 (all public types and members to be documented) because test projects need to make lots of types
public for technical reasaons, but they are not meant for public consumption, so XML doc comments are only
appropriate if they aid understanding within the project.
-->
<NoWarn>SA0001;SA1204;SA1600;SA1602;CS1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Endjin.RecommendedPractices" Version="0.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.1" />
<PackageReference Include="SpecFlow" Version="3.1.80" />
<PackageReference Include="SpecFlow.NUnit" Version="3.1.80" />
Expand All @@ -28,10 +37,4 @@
<ProjectReference Include="..\Corvus.ContentHandling\Corvus.ContentHandling.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="specflow.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ContentType1.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ContentType1
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ContentType1Subtype1.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ContentType1Subtype1
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ContentType2.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ContentType2
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ContentType3.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ContentType3
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ContentType3Subtype1.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ContentType3Subtype1
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ContentType4.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ContentType4
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ContentType5.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ContentType5
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ContentType5Subtype1.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ContentType5Subtype1
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ContentType6.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ContentType6
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ExplicitType1.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ExplicitType1
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ExplicitType1Subtype1.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ExplicitType1Subtype1
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ExplicitType2.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ExplicitType2
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ExplicitType3.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ExplicitType3
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ExplicitType3Subtype1.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ExplicitType3Subtype1
{
Expand Down
@@ -1,6 +1,10 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ExplicitType4.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ExplicitType6
internal class ExplicitType4
{
}
}

This file was deleted.

@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ExplicitType5.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ExplicitType5
{
Expand Down
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="ExplicitType5Subtype1.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ExplicitType5Subtype1
{
Expand Down
10 changes: 10 additions & 0 deletions Solutions/Corvus.ContentHandling.Specs/Driver/ExplicitType6.cs
@@ -0,0 +1,10 @@
// <copyright file="ExplicitType6.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
internal class ExplicitType6
{
}
}
8 changes: 6 additions & 2 deletions Solutions/Corvus.ContentHandling.Specs/Driver/Registration.cs
@@ -1,4 +1,8 @@
namespace Corvus.Extensions.Specs.Driver
// <copyright file="Registration.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Corvus.Extensions.Specs.Driver
{
using System;
using Corvus.ContentHandling;
Expand Down Expand Up @@ -38,7 +42,7 @@ public void Register(ScenarioContext context, ContentFactory factory, bool allow
break;
}
}
catch(Exception e)
catch (Exception e)
{
context.Add("Exception", e);
if (allowExceptions)
Expand Down

0 comments on commit 325cb14

Please sign in to comment.