Skip to content

Commit

Permalink
Merge pull request #60 from EventStore/timothycoleman/license-headers
Browse files Browse the repository at this point in the history
[ESDB-174-2] Apply license header to source files
  • Loading branch information
timothycoleman authored Sep 27, 2024
2 parents 635173f + 27fd5a8 commit 51c1f3e
Show file tree
Hide file tree
Showing 50 changed files with 155 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ trim_trailing_whitespace = true

charset = utf-8

# License headers
dotnet_diagnostic.IDE0073.severity = error
file_header_template = Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.\nEvent Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

# New line preferences
csharp_new_line_before_open_brace = none
csharp_new_line_before_catch = false
Expand All @@ -23,6 +27,12 @@ csharp_new_line_before_members_in_anonymous_types = false
csharp_new_line_before_members_in_object_initializers = false
csharp_new_line_within_query_expression_clauses = true

# disable hint to use primary constructor
dotnet_diagnostic.IDE0290.severity = none

# use ValueTasks correctly
dotnet_diagnostic.CA2012.severity = error

# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using Microsoft.AspNetCore.Routing;

namespace EventStore.Plugins.Authentication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System.Security.Claims;

namespace EventStore.Plugins.Authentication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System.Security.Claims;
using System.Security.Cryptography.X509Certificates;
using Microsoft.AspNetCore.Http;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Authentication;

public interface IAuthenticationPlugin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using Microsoft.AspNetCore.Routing;

namespace EventStore.Plugins.Authentication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Authentication;

public interface IAuthenticationProviderFactory {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using Microsoft.AspNetCore.Http;

namespace EventStore.Plugins.Authentication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System.Security.Claims;

namespace EventStore.Plugins.Authorization;
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Authorization/IAuthorizationPlugin.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Authorization;

public interface IAuthorizationPlugin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System.Security.Claims;

namespace EventStore.Plugins.Authorization;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Authorization;

public interface IAuthorizationProviderFactory {
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Authorization/Operation.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System.Text;

namespace EventStore.Plugins.Authorization;
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Authorization/OperationDefinition.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Authorization;

public readonly record struct OperationDefinition(string Resource, string Action);
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Authorization/Operations.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Authorization;

public static class Operations {
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Authorization/Parameter.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Authorization;

public readonly record struct Parameter(string Name, string Value) {
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/ConfigParser.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using YamlDotNet.RepresentationModel;
using YamlDotNet.Serialization;

Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Diagnostics/DiagnosticsListeners.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System.Collections;
using System.Collections.Concurrent;
using System.Diagnostics;
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Diagnostics/PluginDiagnosticsData.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Diagnostics;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System.Collections.Concurrent;

namespace EventStore.Plugins.Diagnostics;
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/IPlugableComponent.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand Down
1 change: 1 addition & 0 deletions src/EventStore.Plugins/InflectorExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#pragma warning disable IDE0073 // The file header does not match the required text
//The Inflector extensions were partially cloned from Inflector (https://github.com/srkirkland/Inflector)

//The MIT License (MIT)
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/LicenseException.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins;

public class LicenseException(string featureName, Exception? inner = null) : Exception(
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Licensing/ILicenseService.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Licensing;

// Allows plugins to access the current license, get updates to it, and reject a license
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Licensing/License.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System.Diagnostics.CodeAnalysis;
using System.Security.Cryptography;
using Microsoft.IdentityModel.JsonWebTokens;
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Licensing/LicenseConstants.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Licensing;

public static class LicenseConstants {
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Licensing/LicenseMonitor.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using Microsoft.Extensions.Logging;

namespace EventStore.Plugins.Licensing;
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/MD5/IMD5Plugin.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.MD5;

public interface IMD5Plugin {
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/MD5/IMD5Provider.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System.Security.Cryptography;

namespace EventStore.Plugins.MD5;
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/MD5/IMD5ProviderFactory.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.MD5;

public interface IMD5ProviderFactory {
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Plugin.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System.Diagnostics;
using EventStore.Plugins.Diagnostics;
using EventStore.Plugins.Licensing;
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Subsystems/ISubsystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Subsystems;

public interface ISubsystem : IPlugableComponent {
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Subsystems/ISubsystemsPlugin.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Subsystems;

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/SubsystemsPlugin.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using EventStore.Plugins.Subsystems;
using static System.StringComparison;

Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Transforms/ChunkDataReadStream.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System;

Check warning on line 4 in src/EventStore.Plugins/Transforms/ChunkDataReadStream.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Redundant using directive

Using directive is not required by the code and can be safely removed
using System.IO;

Check warning on line 5 in src/EventStore.Plugins/Transforms/ChunkDataReadStream.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Redundant using directive

Using directive is not required by the code and can be safely removed

Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Transforms/ChunkDataWriteStream.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System;

Check warning on line 4 in src/EventStore.Plugins/Transforms/ChunkDataWriteStream.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Redundant using directive

Using directive is not required by the code and can be safely removed
using System.IO;

Check warning on line 5 in src/EventStore.Plugins/Transforms/ChunkDataWriteStream.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Redundant using directive

Using directive is not required by the code and can be safely removed
using System.Security.Cryptography;
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Transforms/IChunkReadTransform.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Transforms;

public interface IChunkReadTransform {
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Transforms/IChunkTransform.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Transforms;

public interface IChunkTransform {
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Transforms/IChunkTransformFactory.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System;

Check warning on line 4 in src/EventStore.Plugins/Transforms/IChunkTransformFactory.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Redundant using directive

Using directive is not required by the code and can be safely removed
using System.IO;

Check warning on line 5 in src/EventStore.Plugins/Transforms/IChunkTransformFactory.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Redundant using directive

Using directive is not required by the code and can be safely removed

Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Transforms/IChunkWriteTransform.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System;

Check warning on line 4 in src/EventStore.Plugins/Transforms/IChunkWriteTransform.cs

View workflow job for this annotation

GitHub Actions / Qodana for .NET

Redundant using directive

Using directive is not required by the code and can be safely removed

namespace EventStore.Plugins.Transforms;
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Transforms/IDbTransform.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Transforms;

public interface IDbTransform {
Expand Down
3 changes: 3 additions & 0 deletions src/EventStore.Plugins/Transforms/TransformType.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Transforms;

public enum TransformType {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Tests.ConfigurationReaderTests;

public class LdapsSettings {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

namespace EventStore.Plugins.Tests.ConfigurationReaderTests;

public class when_reading_valid_configuration {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

// ReSharper disable AccessToDisposedClosure

using EventStore.Plugins.Diagnostics;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using EventStore.Plugins.Diagnostics;

namespace EventStore.Plugins.Tests.Diagnostics;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System.Diagnostics.Metrics;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using EventStore.Plugins.Licensing;
using Microsoft.Extensions.Logging.Testing;

Expand Down
3 changes: 3 additions & 0 deletions test/EventStore.Plugins.Tests/Licensing/LicenseTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

using System.Security.Cryptography;
using EventStore.Plugins.Licensing;

Expand Down
3 changes: 3 additions & 0 deletions test/EventStore.Plugins.Tests/PluginBaseTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Event Store Ltd and/or licensed to Event Store Ltd under one or more agreements.
// Event Store Ltd licenses this file to you under the Event Store License v2 (see LICENSE.md).

// ReSharper disable AccessToDisposedClosure

using System.Reactive.Subjects;
Expand Down

0 comments on commit 51c1f3e

Please sign in to comment.