-
Notifications
You must be signed in to change notification settings - Fork 4
Add Mock.Of<T> and MockRepository support to ConstructorArgumentsShouldMatchAnalyzer #140
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
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
3446785
WIP
rjmurillo f5e634c
Add "As" analyzer with new structure
rjmurillo 7dc69c5
Creating a DiagnosticDescriptor in a ctor had FP on removed rule
rjmurillo af269cc
Add filter for Moq types
rjmurillo 9f7104d
Clean up analyzer warnings
rjmurillo 02de353
Make rule help link constant
rjmurillo cbd113d
Add documentation link for each
rjmurillo 3fdc010
WIP
rjmurillo 650a62e
Add benchmark for Moq1201
rjmurillo 3e48b57
Rename helper for adding Moq reference assemblies
rjmurillo 3fc937a
Fix 1002 analyzer to also emit 1001 rule and drag race
rjmurillo 7e5ddbc
Remove under performing constructor argument analyzer for interfaces
rjmurillo d6f7152
WIP
rjmurillo efbf0b2
Clean up analyzer messages
rjmurillo 5a29a6b
Add VS Live Unit Testing (LUT) config
rjmurillo 13ddad2
WIP
rjmurillo 6a7c7ee
WIP
rjmurillo 239c205
WIP
rjmurillo 03d6c70
WIP
rjmurillo b2b11f9
Clean up analyzer warnings
rjmurillo 92ba4e5
Separate ctor tests into separate files by topic
rjmurillo d0397bb
Clean up analyzer warnings
rjmurillo b5b2abb
Move old interface tests into new analyzer test collateral
rjmurillo 086202a
Clean up analyzer warnings
rjmurillo 90d3eeb
Remove base class for diagnostic analysis
rjmurillo 926db96
Organize types and update analyzers to use constants and gitcommit
rjmurillo 2cd5e07
Remove unused code
rjmurillo 7f926d0
Convert Diagnostic.Create to extension method version
rjmurillo 4fb7c5b
Remove unused code
rjmurillo c840c62
Refactor to use extension method for constructor detection
rjmurillo 74c596a
Remove unused code
rjmurillo a93c9b2
Add test case for delegate that triggers analyzer
rjmurillo 4a8bdd4
Add tests for private constructors
rjmurillo 480e258
Add test cases for internal and protected internal
rjmurillo 2732652
Add case that triggers identifier name syntax code path on behavior d…
rjmurillo 1602432
Revert cases for internal and protected internal
rjmurillo e3a64b2
Clean up code analysis warnings
rjmurillo 43bb547
Merge branch 'main' into feature/simplify-ctor-analyzer
rjmurillo fc5db74
Merge branch 'main' into feature/simplify-ctor-analyzer
rjmurillo cd74ad0
Merge branch 'main' into feature/simplify-ctor-analyzer
rjmurillo d5b0d74
Add missing inherit doc
rjmurillo 91053b5
Remove extra case in switch statement
rjmurillo 4a2cf08
Remove sealed keyword on Initiailize method for ctor analyzer
rjmurillo 70cd7a8
Fix for SA1516
rjmurillo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,153 @@ | ||
| ## The .lutignore file is used by Live Unit Testing to ignore Visual Studio temporary files, build results, | ||
| ## and files generated by popular Visual Studio add-ons when creating a private copy of the source tree that | ||
| ## Live Unit Testing uses for its build. | ||
| ## | ||
| ## This file has same format as git's .gitignore file (https://git-scm.com/docs/gitignore). In fact, in the | ||
| ## case where a .lutignore file is not found, but a .gitignore file is found, Live Unit Testing will use the | ||
| ## .gitignore file directly for the above purpose. | ||
|
|
||
| # User-specific files | ||
| *.suo | ||
| *.user | ||
| *.userprefs | ||
| *.sln.docstates | ||
| .vs/ | ||
| .vscode/ | ||
| .packages/ | ||
| .dotnet/ | ||
| .tools/ | ||
| .idea/ | ||
|
|
||
| # Build results | ||
| [Dd]ebug/ | ||
| [Rr]elease/ | ||
| [Bb]inaries/ | ||
| [Bb]in/ | ||
| [Oo]bj/ | ||
| x64/ | ||
| TestResults/ | ||
|
|
||
| # Debug artifactss | ||
| launchSettings.json | ||
|
|
||
| # Click-Once directory | ||
| publish/ | ||
|
|
||
| # Publish Web Output | ||
| *.Publish.xml | ||
|
|
||
| # NuGet Packages Directory | ||
| packages/ | ||
|
|
||
| # NuGet V3 artifacts | ||
| [Nn]u[Gg]et.exe | ||
| *-packages.config | ||
| *.nuget.props | ||
| *.nuget.targets | ||
| project.lock.json | ||
| msbuild.binlog | ||
| *.project.lock.json | ||
|
|
||
| # Miscellaneous | ||
| *_i.c | ||
| *_p.c | ||
| *.ilk | ||
| *.meta | ||
| *.obj | ||
| *.pch | ||
| *.pdb | ||
| *.pgc | ||
| *.pgd | ||
| *.sbr | ||
| *.tlb | ||
| *.tli | ||
| *.tlh | ||
| *.tmp | ||
| *.tmp_proj | ||
| *.log | ||
| *.wrn | ||
| *.vspscc | ||
| *.vssscc | ||
| .builds | ||
| *.pidb | ||
| *.scc | ||
| sql/ | ||
| *.Cache | ||
| ClientBin/ | ||
| [Ss]tyle[Cc]op.* | ||
| ~$* | ||
| *~ | ||
| *.dbmdl | ||
| *.[Pp]ublish.xml | ||
| *.pfx | ||
| *.publishsettings | ||
|
|
||
| # Visual Studio cache files | ||
| *.sln.ide/ | ||
|
|
||
| # Visual C++ cache files | ||
| ipch/ | ||
| *.aps | ||
| *.ncb | ||
| *.opensdf | ||
| *.sdf | ||
| *.cachefile | ||
| *.VC.opendb | ||
| *.VC.db | ||
|
|
||
| # Windows Store app package directory | ||
| AppPackages/ | ||
|
|
||
| # Visual Studio profiler | ||
| *.psess | ||
| *.vsp | ||
| *.vspx | ||
|
|
||
| # Guidance Automation Toolkit | ||
| *.gpState | ||
|
|
||
| # ReSharper | ||
| _ReSharper*/ | ||
| *.[Rr]e[Ss]harper | ||
| *.DotSettings | ||
|
|
||
| # TeamCity is a build add-in | ||
| _TeamCity* | ||
|
|
||
| # DotCover is a Code Coverage Tool | ||
| *.dotCover | ||
|
|
||
| # NCrunch | ||
| *.ncrunch* | ||
| .*crunch*.local.xml | ||
|
|
||
| # Upgrade backups | ||
| _UpgradeReport_Files/ | ||
| Backup*/ | ||
| UpgradeLog*.XML | ||
| UpgradeLog*.htm | ||
|
|
||
| # SQL Server files | ||
| App_Data/*.mdf | ||
| App_Data/*.ldf | ||
|
|
||
| #LightSwitch generated files | ||
| GeneratedArtifacts/ | ||
| _Pvt_Extensions/ | ||
| ModelManifest.xml | ||
|
|
||
| # Windows image file caches | ||
| Thumbs.db | ||
| ehthumbs.db | ||
|
|
||
| # Folder config file | ||
| Desktop.ini | ||
|
|
||
| # Recycle Bin used on file shares | ||
| $RECYCLE.BIN/ | ||
|
|
||
| # Mac desktop service store files | ||
| .DS_Store | ||
|
|
||
| # WPF temp projects | ||
| *wpftmp.* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <LUTConfig Version="1.0"> | ||
| <Repository /> | ||
| <ParallelBuilds>true</ParallelBuilds> | ||
| <ParallelTestRuns>true</ParallelTestRuns> | ||
| <TestCaseTimeout>180000</TestCaseTimeout> | ||
| </LUTConfig> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <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:Boolean x:Key="/Default/Environment/Filtering/ExcludeCoverageFilters/=Moq_002EAnalyzers_002EBenchmarks_003B_002A_003B_002A_003B_002A/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| namespace Moq.Analyzers.Common; | ||
|
rjmurillo marked this conversation as resolved.
|
||
|
|
||
| internal static class CompilationOptionsExtensions | ||
| { | ||
| /// <summary> | ||
| /// Determines if the diagnostic identified by the given identifier is currently suppressed. | ||
| /// </summary> | ||
| /// <param name="compilationOptions">The compilation options that will be used to determine if the diagnostic is currently suppressed.</param> | ||
| /// <param name="descriptor">The diagnostic descriptor to check.</param> | ||
| /// <returns>True if the diagnostic is currently suppressed.</returns> | ||
| internal static bool IsAnalyzerSuppressed(this CompilationOptions compilationOptions, DiagnosticDescriptor descriptor) | ||
|
rjmurillo marked this conversation as resolved.
|
||
| { | ||
| switch (descriptor.GetEffectiveSeverity(compilationOptions)) | ||
| { | ||
| case ReportDiagnostic.Suppress: | ||
| return true; | ||
| default: | ||
| return false; | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| namespace Moq.Analyzers.Common; | ||
|
rjmurillo marked this conversation as resolved.
|
||
|
|
||
| internal static class DiagnosticCategory | ||
| { | ||
| internal const string Moq = nameof(Moq); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.