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

Update Configuration.md #3251

Merged
merged 1 commit into from
Dec 30, 2020
Merged

Update Configuration.md #3251

merged 1 commit into from
Dec 30, 2020

Conversation

mayermart
Copy link
Contributor

I think $(MSBuildThisFileDirectory) can be used to simplify the .props file

$(MSBuildThisFileDirectory) can be used to simplify the .props file
@codecov
Copy link

codecov bot commented Nov 27, 2020

Codecov Report

Merging #3251 (94b6d26) into master (aa26bda) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3251   +/-   ##
=======================================
  Coverage   94.39%   94.40%           
=======================================
  Files         967      967           
  Lines      108429   108429           
  Branches     3675     3675           
=======================================
+ Hits       102356   102358    +2     
+ Misses       5143     5142    -1     
+ Partials      930      929    -1     

@sharwell
Copy link
Member

sharwell commented Nov 27, 2020

💭 This seems fine, but I'm not one of the users of this configuration form. It would be good to get a review from one of the original contributors of this section.

/cc @ngeor

@ngeor
Copy link
Contributor

ngeor commented Nov 27, 2020

Hi, I haven't worked with .NET pretty much since I did this contribution more than 2 years ago :-(

The configuration sample was about having an external NuGet package ( MyCompany.MyRules.nuget ) that holds StyleCop configuration, so I can share it in multiple projects without copy pasting around the config file.

If this "MSBuildThisFileDirectory" variable somehow points to a NuGet package, go ahead with the changes. If your change is actually in a different direction (copy pasting the stylecop file rules in multiple projects), I think then you should add it to the docs as a new section.

@mayermart
Copy link
Contributor Author

mayermart commented Nov 27, 2020

The Documentation includes a hint which covers this scenario:

Tip: You can specify a relative path in a targets file that's relative to the targets file and not relative to the original project file.

The NuGet Package i created this way works at least with PackageReference in old-style and sdk-style Projects

@sharwell sharwell merged commit 23db6c0 into DotNetAnalyzers:master Dec 30, 2020
@sharwell sharwell added this to the 1.2-beta.next milestone Dec 30, 2020
@mayermart mayermart deleted the patch-1 branch December 30, 2020 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants