Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strengthen EditorConfig to help enforce coding standards #775

Merged
merged 16 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
414 changes: 117 additions & 297 deletions .editorconfig

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Project>
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1701;1702;1705;VSX1000;SA1010</NoWarn>
<NoWarn>$(NoWarn);1591;1701;1702;1705;VSX1000</NoWarn>
<Platform>AnyCPU</Platform>
<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
<IsBenchmarkProject>$(MSBuildProjectName.Contains('Benchmarks'))</IsBenchmarkProject>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ namespace DynamicData.Aggregation
public bool Equals(DynamicData.Aggregation.AggregateItem<TObject> other) { }
public override bool Equals(object? obj) { }
public override int GetHashCode() { }
public static bool operator !=(DynamicData.Aggregation.AggregateItem<TObject> left, DynamicData.Aggregation.AggregateItem<TObject> right) { }
public static bool operator ==(DynamicData.Aggregation.AggregateItem<TObject> left, DynamicData.Aggregation.AggregateItem<TObject> right) { }
public static bool operator !=(in DynamicData.Aggregation.AggregateItem<TObject> left, in DynamicData.Aggregation.AggregateItem<TObject> right) { }
public static bool operator ==(in DynamicData.Aggregation.AggregateItem<TObject> left, in DynamicData.Aggregation.AggregateItem<TObject> right) { }
}
public enum AggregateType
{
Expand Down Expand Up @@ -669,7 +669,7 @@ namespace DynamicData
public Change(DynamicData.ListChangeReason reason, System.Collections.Generic.IEnumerable<T> items, int index = -1) { }
public Change(DynamicData.ListChangeReason reason, T current, int index = -1) { }
public Change(T current, int currentIndex, int previousIndex) { }
public Change(DynamicData.ListChangeReason reason, T current, DynamicData.Kernel.Optional<T> previous, int currentIndex = -1, int previousIndex = -1) { }
public Change(DynamicData.ListChangeReason reason, T current, in DynamicData.Kernel.Optional<T> previous, int currentIndex = -1, int previousIndex = -1) { }
public DynamicData.ItemChange<T> Item { get; }
public DynamicData.RangeChange<T> Range { get; }
public DynamicData.ListChangeReason Reason { get; }
Expand All @@ -687,7 +687,7 @@ namespace DynamicData
{
public Change(DynamicData.ChangeReason reason, TKey key, TObject current, int index = -1) { }
public Change(TKey key, TObject current, int currentIndex, int previousIndex) { }
public Change(DynamicData.ChangeReason reason, TKey key, TObject current, DynamicData.Kernel.Optional<TObject> previous, int currentIndex = -1, int previousIndex = -1) { }
public Change(DynamicData.ChangeReason reason, TKey key, TObject current, in DynamicData.Kernel.Optional<TObject> previous, int currentIndex = -1, int previousIndex = -1) { }
public TObject Current { get; }
public int CurrentIndex { get; }
public TKey Key { get; }
Expand All @@ -698,8 +698,8 @@ namespace DynamicData
public override bool Equals(object? obj) { }
public override int GetHashCode() { }
public override string ToString() { }
public static bool operator !=(DynamicData.Change<TObject, TKey> left, DynamicData.Change<TObject, TKey> right) { }
public static bool operator ==(DynamicData.Change<TObject, TKey> left, DynamicData.Change<TObject, TKey> right) { }
public static bool operator !=(in DynamicData.Change<TObject, TKey> left, in DynamicData.Change<TObject, TKey> right) { }
public static bool operator ==(in DynamicData.Change<TObject, TKey> left, in DynamicData.Change<TObject, TKey> right) { }
}
public static class EnumerableEx
{
Expand Down Expand Up @@ -763,13 +763,13 @@ namespace DynamicData
public interface IChangeSetAdaptor<T>
where T : notnull
{
void Adapt(DynamicData.IChangeSet<T> change);
void Adapt(DynamicData.IChangeSet<T> changes);
}
public interface IChangeSetAdaptor<TObject, TKey>
where TObject : notnull
where TKey : notnull
{
void Adapt(DynamicData.IChangeSet<TObject, TKey> change);
void Adapt(DynamicData.IChangeSet<TObject, TKey> changes);
}
public interface IChangeSet<TObject> : DynamicData.IChangeSet, System.Collections.Generic.IEnumerable<DynamicData.Change<TObject>>, System.Collections.IEnumerable
where TObject : notnull
Expand Down Expand Up @@ -901,7 +901,7 @@ namespace DynamicData
where TObject : notnull
where TKey : notnull
{
void Adapt(DynamicData.ISortedChangeSet<TObject, TKey> change);
void Adapt(DynamicData.ISortedChangeSet<TObject, TKey> changes);
}
public interface ISortedChangeSet<TObject, TKey> : DynamicData.IChangeSet, DynamicData.IChangeSet<TObject, TKey>, System.Collections.Generic.IEnumerable<DynamicData.Change<TObject, TKey>>, System.Collections.IEnumerable
where TObject : notnull
Expand Down Expand Up @@ -996,7 +996,7 @@ namespace DynamicData
{
public static readonly DynamicData.ItemChange<T> Empty;
public ItemChange(DynamicData.ListChangeReason reason, T current, int currentIndex) { }
public ItemChange(DynamicData.ListChangeReason reason, T current, DynamicData.Kernel.Optional<T> previous, int currentIndex = -1, int previousIndex = -1) { }
public ItemChange(DynamicData.ListChangeReason reason, T current, in DynamicData.Kernel.Optional<T> previous, int currentIndex = -1, int previousIndex = -1) { }
public T Current { get; }
public int CurrentIndex { get; }
public DynamicData.Kernel.Optional<T> Previous { get; }
Expand All @@ -1006,8 +1006,8 @@ namespace DynamicData
public override bool Equals(object? obj) { }
public override int GetHashCode() { }
public override string ToString() { }
public static bool operator !=(DynamicData.ItemChange<T> left, DynamicData.ItemChange<T> right) { }
public static bool operator ==(DynamicData.ItemChange<T> left, DynamicData.ItemChange<T> right) { }
public static bool operator !=(in DynamicData.ItemChange<T> left, in DynamicData.ItemChange<T> right) { }
public static bool operator ==(in DynamicData.ItemChange<T> left, in DynamicData.ItemChange<T> right) { }
}
public enum ListChangeReason
{
Expand Down Expand Up @@ -1061,7 +1061,7 @@ namespace DynamicData
where TKey : notnull
{
public Node(TObject item, TKey key) { }
public Node(TObject item, TKey key, DynamicData.Kernel.Optional<DynamicData.Node<TObject, TKey>> parent) { }
public Node(TObject item, TKey key, in DynamicData.Kernel.Optional<DynamicData.Node<TObject, TKey>> parent) { }
public DynamicData.IObservableCache<DynamicData.Node<TObject, TKey>, TKey> Children { get; }
public int Depth { get; }
public bool IsRoot { get; }
Expand Down Expand Up @@ -2523,8 +2523,8 @@ namespace DynamicData.Kernel
public override bool Equals(object? obj) { }
public override int GetHashCode() { }
public override string ToString() { }
public static bool operator !=(DynamicData.Kernel.ItemWithIndex<T> left, DynamicData.Kernel.ItemWithIndex<T> right) { }
public static bool operator ==(DynamicData.Kernel.ItemWithIndex<T> left, DynamicData.Kernel.ItemWithIndex<T> right) { }
public static bool operator !=(in DynamicData.Kernel.ItemWithIndex<T> left, in DynamicData.Kernel.ItemWithIndex<T> right) { }
public static bool operator ==(in DynamicData.Kernel.ItemWithIndex<T> left, in DynamicData.Kernel.ItemWithIndex<T> right) { }
}
public readonly struct ItemWithValue<TObject, TValue> : System.IEquatable<DynamicData.Kernel.ItemWithValue<TObject, TValue>>
{
Expand All @@ -2535,43 +2535,43 @@ namespace DynamicData.Kernel
public override bool Equals(object? obj) { }
public override int GetHashCode() { }
public override string ToString() { }
public static bool operator !=(DynamicData.Kernel.ItemWithValue<TObject, TValue> left, DynamicData.Kernel.ItemWithValue<TObject, TValue> right) { }
public static bool operator ==(DynamicData.Kernel.ItemWithValue<TObject, TValue> left, DynamicData.Kernel.ItemWithValue<TObject, TValue> right) { }
public static bool operator !=(in DynamicData.Kernel.ItemWithValue<TObject, TValue> left, in DynamicData.Kernel.ItemWithValue<TObject, TValue> right) { }
public static bool operator ==(in DynamicData.Kernel.ItemWithValue<TObject, TValue> left, in DynamicData.Kernel.ItemWithValue<TObject, TValue> right) { }
}
public sealed class OptionElse
{
public void Else(System.Action action) { }
}
public static class OptionExtensions
{
public static DynamicData.Kernel.Optional<TDestination> Convert<TSource, TDestination>(this DynamicData.Kernel.Optional<TSource> source, System.Func<TSource, DynamicData.Kernel.Optional<TDestination>> converter)
public static DynamicData.Kernel.Optional<TDestination> Convert<TSource, TDestination>(in this DynamicData.Kernel.Optional<TSource> source, System.Func<TSource, DynamicData.Kernel.Optional<TDestination>> converter)
where TSource : notnull
where TDestination : notnull { }
public static DynamicData.Kernel.Optional<TDestination> Convert<TSource, TDestination>(this DynamicData.Kernel.Optional<TSource> source, System.Func<TSource, TDestination> converter)
public static DynamicData.Kernel.Optional<TDestination> Convert<TSource, TDestination>(in this DynamicData.Kernel.Optional<TSource> source, System.Func<TSource, TDestination> converter)
where TSource : notnull
where TDestination : notnull { }
public static TDestination? ConvertOr<TSource, TDestination>(this DynamicData.Kernel.Optional<TSource> source, System.Func<TSource?, TDestination?> converter, System.Func<TDestination?> fallbackConverter)
public static TDestination? ConvertOr<TSource, TDestination>(in this DynamicData.Kernel.Optional<TSource> source, System.Func<TSource?, TDestination?> converter, System.Func<TDestination?> fallbackConverter)
where TSource : notnull { }
public static DynamicData.Kernel.Optional<T> FirstOrOptional<T>(this System.Collections.Generic.IEnumerable<T> source, System.Func<T, bool> selector)
where T : notnull { }
public static DynamicData.Kernel.OptionElse IfHasValue<T>(this DynamicData.Kernel.Optional<T> source, System.Action<T> action)
public static DynamicData.Kernel.OptionElse IfHasValue<T>(in this DynamicData.Kernel.Optional<T> source, System.Action<T> action)
where T : notnull { }
public static DynamicData.Kernel.OptionElse IfHasValue<T>(this DynamicData.Kernel.Optional<T>? source, System.Action<T> action)
where T : notnull { }
public static DynamicData.Kernel.Optional<TValue> Lookup<TValue, TKey>(this System.Collections.Generic.IDictionary<TKey, TValue> source, TKey key)
where TValue : notnull { }
public static DynamicData.Kernel.Optional<T> OrElse<T>(this DynamicData.Kernel.Optional<T> source, System.Func<DynamicData.Kernel.Optional<T>> fallbackOperation)
public static DynamicData.Kernel.Optional<T> OrElse<T>(in this DynamicData.Kernel.Optional<T> source, System.Func<DynamicData.Kernel.Optional<T>> fallbackOperation)
where T : notnull { }
public static bool RemoveIfContained<TValue, TKey>(this System.Collections.Generic.IDictionary<TKey, TValue> source, TKey key) { }
public static System.Collections.Generic.IEnumerable<T> SelectValues<T>(this System.Collections.Generic.IEnumerable<DynamicData.Kernel.Optional<T>> source)
where T : notnull { }
public static T ValueOr<T>(this DynamicData.Kernel.Optional<T> source, System.Func<T> valueSelector)
public static T ValueOr<T>(in this DynamicData.Kernel.Optional<T> source, System.Func<T> valueSelector)
where T : notnull { }
public static T ValueOr<T>(this T? source, T defaultValue)
where T : struct { }
public static T? ValueOrDefault<T>(this DynamicData.Kernel.Optional<T> source)
public static T? ValueOrDefault<T>(in this DynamicData.Kernel.Optional<T> source)
where T : notnull { }
public static T ValueOrThrow<T>(this DynamicData.Kernel.Optional<T> source, System.Func<System.Exception> exceptionGenerator)
public static T ValueOrThrow<T>(in this DynamicData.Kernel.Optional<T> source, System.Func<System.Exception> exceptionGenerator)
where T : notnull { }
}
public static class OptionObservableExtensions
Expand Down Expand Up @@ -2617,12 +2617,12 @@ namespace DynamicData.Kernel
public override int GetHashCode() { }
public override string? ToString() { }
public static DynamicData.Kernel.Optional<T> Create(T? value) { }
public static T? FromOptional(DynamicData.Kernel.Optional<T> value) { }
public static T? FromOptional(in DynamicData.Kernel.Optional<T> value) { }
public static DynamicData.Kernel.Optional<T> ToOptional(T? value) { }
public static T? op_Explicit(DynamicData.Kernel.Optional<T> value) { }
public static T? op_Explicit(in DynamicData.Kernel.Optional<T> value) { }
public static DynamicData.Kernel.Optional<T> op_Implicit(T? value) { }
public static bool operator !=(DynamicData.Kernel.Optional<T> left, DynamicData.Kernel.Optional<T> right) { }
public static bool operator ==(DynamicData.Kernel.Optional<T> left, DynamicData.Kernel.Optional<T> right) { }
public static bool operator !=(in DynamicData.Kernel.Optional<T> left, in DynamicData.Kernel.Optional<T> right) { }
public static bool operator ==(in DynamicData.Kernel.Optional<T> left, in DynamicData.Kernel.Optional<T> right) { }
}
}
namespace DynamicData.List
Expand Down
Loading