andrewabest / Conventional

A suite of convention specifications for enforcing type and style conventions in your codebase
Microsoft Public License
97 stars 29 forks source link

Files should be marked as Resource #46

Closed teyc closed 7 years ago

teyc commented 7 years ago

WPF applications use Linked Resources, as distinct from embedded resources. See https://msdn.microsoft.com/en-us/library/ht9h2dk8(VS.80).aspx

This convention test enforces matching files to be built as "Resource" type.

teyc commented 7 years ago

I've run into an issue with the Dogfooding_MustOnlyContainToDoAndNoteComments test. Resource.resx autogenerates Resource.Designer.cs which breaks the rules. This can either be solved by explicitly exempting *.Designer.cs or alternatively walk the csproj and look for dependencies... i.e.

<Compile Include="Conventional\Conventions\Assemblies\Resource.Designer.cs">
      <DependentUpon>Resource.resx</DependentUpon>
</Compile>

Which way would you prefer?

andrewabest commented 7 years ago

@teyc I think exempting *.Designer.cs is acceptable - auto generated code shouldn't really fall into the scope of this convention.