StyleCopOverrideSettingsFile will look in %AppData% if not set

#1 Merged
Repository
gareth_budden
Branch
default
Repository
adamralph
Branch
default
Author
  1. Gareth Budden
Reviewers
Description

Hi,

This pull request tells msbuild to attempt to find the stylecop settings file in AppData, providing the StyleCopOverrideSettingsFile hasn't already been set. If it can't find the file at that location it will set it to empty like before.

Full path is %AppData%\Roaming\StyleCop\settings.StyleCop

I've found it to be a useful little convention, so am offering it back.

Comments (2)

  1. Adam Ralph repo owner

    @Gareth Budden thanks very much for this!

    Given that the StyleCop.MSBuild file is just a copy of what is in the official StyleCop package, this feature should really be added to StyleCop itself, over at https://stylecop.codeplex.com/. However, activity over there seems to have ground to a halt, so I'm happy to ship this as a StyleCop.MSBuild feature in the meantime.

    It just means that care will have to be taken not to regress the change when a new version of StyleCop is released and the accompanying new version of StyleCop.MSBuild is prepared.

    I'll merge this now and push out a new version of the package. To simplify things down the line, it would be great if you could raise the same PR over at StyleCop to get the changes in upstream.

    Thanks again!