machine / machine.specifications

Machine.Specifications is a Context/Specification framework for .NET that removes language noise and simplifies tests.
MIT License
885 stars 178 forks source link

Can someone create a Rider / R# code style #450

Closed mikeblakeuk closed 2 years ago

mikeblakeuk commented 3 years ago

Based on https://github.com/machine/machine.specifications/wiki/Best-Practices

It would be nice if it was part of the defaults .e.g

image

(e.g. remove private, remove readonly, correct order etc)

We currently have

<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:s="clr-namespace:System;assembly=mscorlib"
                        xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml"
                        xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
    <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_PRIVATE_MODIFIER/@EntryValue">Implicit</s:String>
    <s:String
    x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb"&gt;&lt;ExtraRule Prefix="_" Suffix="" Style="aaBb" /&gt;&lt;/Policy&gt;</s:String>
    <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=TypesAndNamespaces/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb"&gt;&lt;ExtraRule Prefix="" Suffix="" Style="AaBb" /&gt;&lt;ExtraRule Prefix="" Suffix="" Style="aaBb_AaBb" /&gt;&lt;/Policy&gt;</s:String></wpf:ResourceDictionary>
robertcoltheart commented 3 years ago

Ultimately, this need will be filled by the analyzers: https://github.com/machine/machine.specifications.analyzers but this is still a WIP.

However, in the meantime, you can use the EditorConfig settings I've posted here: https://github.com/machine/machine.specifications/wiki/EditorConfig

robertcoltheart commented 2 years ago

Closing, as we have an interim solution (Editorconfig) and a strategic solution (Roslyn analyzers) in progress.