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

Gh 11 allow configuration of safe api misuses #21

Merged
merged 21 commits into from
Jul 18, 2018

Conversation

tpodolak
Copy link
Member

Closes #11
Things to be aware of:

  • TinyJson was incorporated into the source code as Newtonsoft.Json package was causing typeload exceptions once analyzer was deployed to Visual Studio
  • for easier debugging I've added vsix projects for VB and C# analyzers, there are not meant to be pushed to nuget or anywhere else, they are in here only for easier debugging of deployed package in VS
  • due to the bug in Roslyn (Solution.AddAdditionalDocument does not add a new file with AdditionalFiles item type dotnet/roslyn#4655) we are not able to add nsubstitute.json from analyzer directly - as it will not appear as additional analyzer file. Because of that bug user have to create empty file on its own in order for the suppressions to work
  • suppressions was only implemented for rule NS001 - non-virtual member call, as far as I know there is no other ways of safe api abuses

@coveralls
Copy link

Pull Request Test Coverage Report for Build wcx46yssqfkdq6wj

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-1.3%) to 95.954%

Totals Coverage Status
Change from base Build yt8y3im84kbfrkjq: -1.3%
Covered Lines: 664
Relevant Lines: 692

💛 - Coveralls

Copy link
Member

@dtchepak dtchepak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good as far as I can tell! 😅

I'm trying to test this out. Do I add nsubstitute.json to solution items, or to the specific csproj?

@tpodolak
Copy link
Member Author

@dtchepak nsubstitute.json must be placed in given project plus it has to be marked as additional analyzer file (build action)

@dtchepak
Copy link
Member

@tpodolak Got it, thanks! 👍 Works great. That Roslyn bug is frustrating though!

@tpodolak tpodolak merged commit 1a911be into dev Jul 18, 2018
@tpodolak tpodolak deleted the GH-11-allow-configuration-of-safe-api-misuses branch January 31, 2023 23:06
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.

None yet

3 participants