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

Roslyn analyzers and code fixes #1076

Merged
merged 245 commits into from Mar 19, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
245 commits
Select commit Hold shift + click to select a range
b42ac37
Moved initial logig to fork.
savpek Dec 25, 2017
d2f872f
Version with 'by project' results.
savpek Dec 25, 2017
d366b61
Now analyzers run for all projects after startup.
savpek Dec 25, 2017
b374a3f
Small refactorings.
savpek Dec 25, 2017
6ce7e66
Small refactoring.
savpek Dec 25, 2017
cc8f251
Refactored analyzers to providers.
savpek Dec 26, 2017
978fbdd
Refactored compilation as single solution bound (review fix).
savpek Jan 5, 2018
80801ed
Undoed accidental change.
savpek Jan 5, 2018
3ec70fd
Merge branch 'master' into roslyn-analyzers
savpek Jan 11, 2018
1bbd78e
Merge branch 'master' into roslyn-analyzers
savpek Jan 13, 2018
e168896
Merge branch 'master' into roslyn-analyzers
savpek Jan 26, 2018
e3ad473
Merge branch 'master' into roslyn-analyzers
savpek Feb 8, 2018
23e47ee
Merge branch 'master' into roslyn-analyzers
savpek Jul 22, 2018
4976660
Before debugging strange type error.
savpek Jul 22, 2018
86d197a
Simple first working version.
savpek Jul 22, 2018
544aec8
Cleanup.
savpek Jul 22, 2018
dc527fb
Implemented loading from project analyzer references.
savpek Jul 22, 2018
68fef87
Cleanup.
savpek Jul 22, 2018
e11d11b
Small lazy invocation tweak.
savpek Jul 22, 2018
9070f09
Updated cacellation token handling and way how invalid analyzer ref i…
savpek Jul 24, 2018
5adf1a1
Tweaked assembly discovery algorithm for analyzers.
savpek Jul 24, 2018
1d79739
Initial tests for analyzers.
savpek Jul 25, 2018
fa2721e
Testfix.
savpek Jul 25, 2018
21c670c
Improved tests.
savpek Jul 25, 2018
7ec5cf0
Throtling to avoid certain issues with error reporting.
savpek Jul 25, 2018
f0b4e2a
Merge branch 'master' into roslyn-analyzers
savpek Jul 25, 2018
a8e388a
Testfix.
savpek Jul 25, 2018
177c41b
Attempt to fix hanging cake tests on travis
savpek Jul 26, 2018
2d0c255
Refactored diagnostic service.
savpek Jul 28, 2018
1e607cc
Tweaks.
savpek Jul 29, 2018
21f91c3
Refactoring and tweaks.
savpek Jul 29, 2018
b60d5b0
Added support for remove unnecessary usings.
savpek Jul 29, 2018
8cc9ad2
Implemented code fixes support by project analyzer references.
savpek Jul 29, 2018
bfe05ad
Made semantic analysis result distinct.
savpek Jul 30, 2018
371271d
Update to distinct algorithm.
savpek Jul 30, 2018
7ed7702
Improved version but still has issues with larger projects.
savpek Jul 30, 2018
b51d8f5
Fixes for larger project (like omnisharp).
savpek Jul 30, 2018
51d0048
Testfixes and grouping support on code check service.
savpek Jul 30, 2018
3989685
Testfixes.
savpek Jul 30, 2018
4986456
Small naming fix.
savpek Jul 31, 2018
8511611
Implemented first version of project rulesets.
savpek Jul 31, 2018
a62fdc0
Implemented test for testrules.
savpek Jul 31, 2018
786cbab
Implemented another test for rulesets.
savpek Jul 31, 2018
bc6c9ef
Tweaks for analyzer responsivity.
savpek Jul 31, 2018
1297a62
Ooppss...
savpek Jul 31, 2018
44f79ab
Improved analysis threading.
savpek Aug 1, 2018
19ee0ea
Cleanup.
savpek Aug 1, 2018
9e83c60
User experience and test tweaks.
savpek Aug 1, 2018
b32b04d
Implemented final tests for rules.
savpek Aug 2, 2018
4844226
Undo for accidentally pushed change.
savpek Aug 2, 2018
7ae79b0
Fixed test.
savpek Aug 2, 2018
a06ddb6
Refactored tests.
savpek Aug 5, 2018
0db9e4f
Merge branch 'master' into roslyn-analyzers
savpek Aug 6, 2018
f10fa7b
Review fixes expect assembly loader from DI.
savpek Aug 8, 2018
910a365
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Aug 8, 2018
f4b829c
Sorted usings.
savpek Aug 8, 2018
00da2a9
DI fixes, theres currently issue during runtime however.
savpek Aug 8, 2018
405b2bd
Merge branch 'master' into roslyn-analyzers
savpek Aug 8, 2018
014865a
Implemented missing method.
savpek Aug 8, 2018
2dc672c
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Aug 8, 2018
b0242ce
Some testfixes, however theres changes from master that require chang…
savpek Aug 8, 2018
bf38248
Fix that is required for cake project system to work with diagnostics.
savpek Aug 9, 2018
9d7e2ae
Removed obsolete hack.
savpek Aug 9, 2018
44949a2
More robust initialization routine.
savpek Aug 10, 2018
b3654d4
Small style tweaks.
savpek Aug 10, 2018
b6210f0
Merge branch 'master' into roslyn-analyzers
savpek Aug 10, 2018
bf9db1c
Removed empty class.
savpek Aug 10, 2018
74b6046
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Aug 10, 2018
636a02f
Merge branch 'master' into roslyn-analyzers
savpek Aug 19, 2018
ee18d0f
Some merge fixes.
savpek Aug 19, 2018
bf89628
Fixed mistake in wait routine.
savpek Aug 21, 2018
8594fe8
Small readibility update.
savpek Aug 21, 2018
6575055
Added todo.
savpek Aug 21, 2018
85d424f
Fixed support with misc files.
savpek Aug 21, 2018
871c1d7
Merge branch 'master' into roslyn-analyzers
savpek Aug 24, 2018
32b0c85
Restored null safety.
savpek Aug 24, 2018
2ec0450
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Aug 24, 2018
39e33ec
Fixed mistake.
savpek Aug 24, 2018
65837a9
Merge branch 'master' into roslyn-analyzers
savpek Aug 28, 2018
fa9f660
Review updates, however theres broken csx diagnostic tests still.
savpek Aug 28, 2018
55cf797
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Aug 28, 2018
4233203
Merge branch 'master' into roslyn-analyzers
savpek Aug 29, 2018
e5ef6b3
Fixed custom code actions.
savpek Aug 31, 2018
c5c92f0
Testfixes.
savpek Aug 31, 2018
3aaf770
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Aug 31, 2018
0e59d1b
Merge branch 'master' into roslyn-analyzers
savpek Sep 6, 2018
5b9b265
Small review fixes and simplified assembly loader algorithm.
savpek Sep 9, 2018
902cfe1
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Sep 9, 2018
3e9ec2a
Merge branch 'master' into roslyn-analyzers
savpek Sep 9, 2018
4989125
Mergefix.
savpek Sep 9, 2018
16ef3bb
Fixed changed MiscFile project name.
savpek Sep 10, 2018
2360ee2
Renamed service with better name and fixed missing language for analy…
savpek Sep 10, 2018
ec0e520
Review fixes for code fix provider.
savpek Sep 10, 2018
28a9118
Small tweaks for linq.
savpek Sep 10, 2018
f32c8e7
Immutablity to csharpdiagnostic service.
savpek Sep 10, 2018
abea526
Merge branch 'master' into roslyn-analyzers
savpek Sep 12, 2018
6ff3af8
Merge branch 'master' into roslyn-analyzers
savpek Sep 13, 2018
b33dd60
Comment to explain non self descriptive initial wait.
savpek Sep 14, 2018
d4e7a6e
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Sep 14, 2018
51359b4
Support for roslyn 'IDE' analyzers.
savpek Sep 16, 2018
862d8de
Testfixes and added test that IDE analyzers are enabled.
savpek Sep 23, 2018
f64738d
Better comment on code based on review.
savpek Sep 23, 2018
e761e87
Merge branch 'master' into roslyn-analyzers
savpek Sep 23, 2018
9c25d64
Testfix for signed project.
savpek Sep 23, 2018
24f08b1
Testfix.
savpek Sep 23, 2018
1c3c989
Small test tweak.
savpek Sep 23, 2018
a0f5258
Buildfix.
savpek Sep 23, 2018
0f41ea5
Merge branch 'master' into roslyn-analyzers
savpek Oct 2, 2018
e25d686
Merge branch 'master' into roslyn-analyzers
savpek Oct 3, 2018
bf154f9
Tweaks for issue where workspace updates comes after request.
savpek Oct 5, 2018
2e10c35
Added assert to protect possibly internal changes of roslyn.
savpek Oct 5, 2018
9028a01
Increased timeout and added comment about asserting.
savpek Oct 5, 2018
41ccefc
Further tweaked timeouts on event mechanism asserts.
savpek Oct 5, 2018
164bae4
Increased another 'assert' timeout.
savpek Oct 5, 2018
02ca6cb
Fix for threading issue in test utility.
savpek Oct 5, 2018
39e3bdc
Trigger to test build stability
savpek Oct 5, 2018
f635588
Trigger to test build stability.
savpek Oct 5, 2018
a6f825b
Trigger to test build stability.
savpek Oct 5, 2018
f210d14
Yet another attempt to get build execute.
savpek Oct 5, 2018
f8cce2d
Trigger build
savpek Oct 5, 2018
dbab30c
Added original caller name tracking for OmnisharpTestHostDisposing.
savpek Oct 5, 2018
be8f23e
Attempt to improve robustness of tests.
savpek Oct 7, 2018
9cca424
Moved tool to test utilities.
savpek Oct 7, 2018
9f64935
Added missing file.
savpek Oct 7, 2018
ffe8e8a
Test build robustnes
savpek Oct 7, 2018
ed82a59
Test build robustnes
savpek Oct 7, 2018
ed29a61
Merge branch 'master' into roslyn-analyzers
savpek Oct 13, 2018
e25e934
Merge branch 'master' into roslyn-analyzers
savpek Oct 17, 2018
c4dfc19
Merge branch 'master' into roslyn-analyzers
savpek Oct 29, 2018
21018b9
Merge branch 'master' into roslyn-analyzers
savpek Nov 2, 2018
c322d46
Fix for possible null ref issue.
savpek Nov 2, 2018
336a799
Fixed mistake on exception handling when using WhenAll.
savpek Nov 2, 2018
acb954f
Trigger build
savpek Nov 2, 2018
a734c16
Merge branch 'master' into roslyn-analyzers
savpek Nov 3, 2018
6aea8d1
Merge branch 'master' into roslyn-analyzers
savpek Nov 3, 2018
eba7ca5
Merge branch 'master' into roslyn-analyzers
savpek Nov 7, 2018
bb93520
Merge branch 'master' into roslyn-analyzers
savpek Nov 9, 2018
c33d8f3
Added fallback code to CodeCheckService, next need to figure out how …
savpek Nov 10, 2018
c34f554
Removed duplicate code.
savpek Nov 10, 2018
c9548f6
Added flag to options.
savpek Nov 10, 2018
42a939a
Use expiremental analysis as default during testing.
savpek Nov 10, 2018
7c7d85a
Disabled CsharpDiagnosticService workers if not enabled.
savpek Nov 10, 2018
3cab565
Buildfix.
savpek Nov 10, 2018
8b538a2
Fix for codefix support when analyzers are disabled.
savpek Nov 10, 2018
de7426e
Updated flag name.
savpek Nov 10, 2018
633555b
Fixed default.
savpek Nov 10, 2018
5295e9b
Merge branch 'master' into roslyn-analyzers
savpek Nov 13, 2018
81d743a
Renamed flag.
savpek Nov 13, 2018
baa2113
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Nov 13, 2018
ffce204
Merge branch 'master' into roslyn-analyzers
savpek Nov 14, 2018
08276f1
Merge branch 'master' into roslyn-analyzers
savpek Nov 15, 2018
b4a656d
Initial structure divide for testability.
savpek Nov 19, 2018
e69334e
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Nov 19, 2018
ee55e0d
Few tests.
savpek Nov 21, 2018
ea54463
More tests for queue functionality.
savpek Nov 25, 2018
047d5ed
Improved functionality to match exceptations.
savpek Nov 25, 2018
6528518
Move towards diagnosis which can be switched by common interface.
savpek Nov 25, 2018
180b979
Refactored ugly if switching of diagnostics behind common class.
savpek Nov 25, 2018
7ad625c
Implementation of api in worker with analyzers.
savpek Nov 26, 2018
8b1b499
Small refactoring.
savpek Nov 26, 2018
5e1ab8c
Added logging when codefix provider cannot be created.
savpek Nov 26, 2018
c8a59ba
Merge branch 'master' into roslyn-analyzers
savpek Dec 4, 2018
4e21965
Merge branch 'master' into roslyn-analyzers
savpek Dec 6, 2018
bb5a896
Moved to more robust time control mechanism.
savpek Dec 6, 2018
b22d717
Throttling period refactoring.
savpek Dec 6, 2018
2d0a7af
Merge branch 'master' into roslyn-analyzers
savpek Dec 13, 2018
6bfb484
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Jan 12, 2019
1f0f347
Merge.
savpek Jan 12, 2019
d8c98fe
Merge branch 'master' into roslyn-analyzers
savpek Jan 17, 2019
d37af46
Small review fix.
savpek Jan 17, 2019
3ebb4fd
Small review update.
savpek Jan 17, 2019
6bd21bb
Typofix.
savpek Jan 17, 2019
4ac48b9
Removed unused member.
savpek Jan 17, 2019
6ce28fc
Testfix.
savpek Jan 18, 2019
eb313dd
Testfix.
savpek Jan 18, 2019
d5b69d2
Restored sdk version to global.json.
savpek Jan 18, 2019
6034988
Added test for multiple thead execution of queue.
savpek Jan 19, 2019
42ec450
Parametrized tests to test both non roslyn analysis and with analysis.
savpek Jan 19, 2019
65c1398
Attempt to remove retry from asserts.
savpek Jan 19, 2019
0384bc7
Removed unused code and restored correct global.json.
savpek Jan 19, 2019
d6b8e8f
File rename.
savpek Jan 22, 2019
f69ffc7
Merge branch 'master' into roslyn-analyzers
savpek Jan 22, 2019
17854f5
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Jan 22, 2019
475bcef
Merge branch 'master' into roslyn-analyzers
savpek Jan 22, 2019
421ef74
Added test to queue facts.
savpek Jan 22, 2019
f074e79
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Jan 22, 2019
80eb9dd
Conditional action facts with and without analyzers.
savpek Jan 27, 2019
afe1ad6
Merge branch 'master' into roslyn-analyzers
savpek Jan 27, 2019
1ee7372
Small refactoring.
savpek Jan 27, 2019
ff9e72b
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Jan 27, 2019
cdb30d0
Merge branch 'master' into roslyn-analyzers
savpek Feb 1, 2019
5e049b1
Merge lsp
savpek Feb 9, 2019
e423278
Fix for lsp merge.
savpek Feb 9, 2019
589512d
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Feb 9, 2019
5e11541
Initial version of single file analysis.
savpek Feb 14, 2019
a3e11d0
Fixes and tweaks for analysis, timeouts and error handling.
savpek Feb 16, 2019
3c8a471
Testfixes.
savpek Feb 16, 2019
242a28b
Testfixes.
savpek Feb 16, 2019
2cd0183
Correct global.json.
savpek Feb 16, 2019
8eeabdf
Reduced clutter from message.
savpek Feb 16, 2019
811cbd9
Build stability testing.
savpek Feb 16, 2019
5dac0aa
Testfix.
savpek Feb 16, 2019
9b4b1f0
Test tweak.
savpek Feb 16, 2019
ad38560
Reattempt with travis builds.
savpek Feb 16, 2019
50f25c5
Threading fix.
savpek Feb 16, 2019
be71dd7
Restored task based version to fix possible deadlock with xunit sched…
savpek Feb 16, 2019
e38e73e
Retest builds.
savpek Feb 17, 2019
b251e24
Added skip to possibly hanging cake tests as test.
savpek Feb 17, 2019
342a140
Skipped more cake tests as test.
savpek Feb 17, 2019
a2f8a63
Restored some cake tests to find correct hanging one.
savpek Feb 17, 2019
5edc6de
Restored tests to see which one is broken one.
savpek Feb 17, 2019
751f3c5
Restored CodeCheckFacts
savpek Feb 17, 2019
856e40e
Skipped code checks again because built was aborted.
savpek Feb 17, 2019
4753e64
CodeCheckFacts from cake tests unignored.
savpek Feb 17, 2019
ce0358c
Restored Can_get_code_actions_from_roslyn to check if it is hanging one.
savpek Feb 17, 2019
f886c8b
Refactored initialization routine for diagnostics and updated test de…
savpek Feb 17, 2019
dd98cfe
Bugfix.
savpek Feb 17, 2019
05c8ed5
Test build stability.
savpek Feb 17, 2019
da6089d
Tiny tweak for logging and comment.
savpek Feb 18, 2019
e0c2590
Merge branch 'master' into roslyn-analyzers
Feb 21, 2019
8afa925
Simplify method
Feb 22, 2019
76cba87
Review fixes.
savpek Feb 22, 2019
1d3965a
Merge branch 'roslyn-analyzers' into pr_feedback
savpek Feb 22, 2019
fd9dc51
Merge pull request #1 from rchande/pr_feedback
savpek Feb 22, 2019
4e4d01c
Small tweak, startup with larger projects.
savpek Feb 24, 2019
01cafcb
Initial fixes for syntax analysis rulesets.
savpek Feb 26, 2019
2a0cb3e
Initial fix for rulesets with syntax analysis.
savpek Feb 26, 2019
0c28cbb
Moved comment to correct location.
savpek Feb 27, 2019
4250f38
Logging improvement.
savpek Feb 27, 2019
2b11dd7
Test for CS rule apply.
savpek Feb 27, 2019
2d81bda
Removed dummy variable.
savpek Feb 27, 2019
1c83919
Fix for document loading.
savpek Feb 27, 2019
cbc81e5
Merge upstream/master.
savpek Feb 27, 2019
ce6ca69
Fixed mistake on document fetching.
savpek Feb 27, 2019
3e7edf8
Merge branch 'master' into roslyn-analyzers
savpek Feb 28, 2019
4c49a96
Merge branch 'master' into roslyn-analyzers
savpek Feb 28, 2019
7e4b77c
Attempt to fix duplicate key error.
savpek Feb 28, 2019
ab42b95
Merge branch 'roslyn-analyzers' of https://github.com/savpek/omnishar…
savpek Feb 28, 2019
583d68a
Small refactoring.
savpek Feb 28, 2019
5abc746
Removed unnecessary semantic model get.
savpek Mar 1, 2019
5ab1836
Merge from upstream.
savpek Mar 14, 2019
d15427c
Fix for null ref error on document removal.
savpek Mar 14, 2019
640a968
Merge remote-tracking branch 'upstream/master' into roslyn-analyzers
savpek Mar 16, 2019
849bf32
Merge branch 'master' into roslyn-analyzers
savpek Mar 17, 2019
9b635c9
Merge branch 'master' into roslyn-analyzers
david-driscoll Mar 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion global.json
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "2.0.0"
savpek marked this conversation as resolved.
Show resolved Hide resolved
"version": "2.1.0"
}
}
Expand Up @@ -99,9 +99,9 @@ private async Task<IEnumerable<DiagnosticLocation>> Analyze(Project project)
var compiled = await project.GetCompilationAsync();
var analysis = await compiled
.WithAnalyzers(this.providers.SelectMany(x => x.CodeDiagnosticAnalyzerProviders).ToImmutableArray())
savpek marked this conversation as resolved.
Show resolved Hide resolved
.GetAnalysisResultAsync(CancellationToken.None);
.GetAllDiagnosticsAsync();

return analysis.GetAllDiagnostics().Select(x => AsDiagnosticLocation(x, project));
return analysis.Select(x => AsDiagnosticLocation(x, project));
}

private static DiagnosticLocation AsDiagnosticLocation(Diagnostic diagnostic, Project project)
Expand Down