-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Roslyn analyzers and code fixes (#1076)
* Moved initial logig to fork. * Version with 'by project' results. * Now analyzers run for all projects after startup. * Small refactorings. * Small refactoring. * Refactored analyzers to providers. * Refactored compilation as single solution bound (review fix). * Undoed accidental change. * Before debugging strange type error. * Simple first working version. * Cleanup. * Implemented loading from project analyzer references. * Cleanup. * Small lazy invocation tweak. * Updated cacellation token handling and way how invalid analyzer ref is handled. * Tweaked assembly discovery algorithm for analyzers. * Initial tests for analyzers. * Testfix. * Improved tests. * Throtling to avoid certain issues with error reporting. * Testfix. * Attempt to fix hanging cake tests on travis * Refactored diagnostic service. * Tweaks. * Refactoring and tweaks. * Added support for remove unnecessary usings. * Implemented code fixes support by project analyzer references. * Made semantic analysis result distinct. * Update to distinct algorithm. * Improved version but still has issues with larger projects. * Fixes for larger project (like omnisharp). * Testfixes and grouping support on code check service. * Testfixes. * Small naming fix. * Implemented first version of project rulesets. * Implemented test for testrules. * Implemented another test for rulesets. * Tweaks for analyzer responsivity. * Ooppss... * Improved analysis threading. * Cleanup. * User experience and test tweaks. * Implemented final tests for rules. * Undo for accidentally pushed change. * Fixed test. * Refactored tests. * Review fixes expect assembly loader from DI. * Sorted usings. * DI fixes, theres currently issue during runtime however. * Implemented missing method. * Some testfixes, however theres changes from master that require changes still. * Fix that is required for cake project system to work with diagnostics. * Removed obsolete hack. * More robust initialization routine. * Small style tweaks. * Removed empty class. * Some merge fixes. * Fixed mistake in wait routine. * Small readibility update. * Added todo. * Fixed support with misc files. * Restored null safety. * Fixed mistake. * Review updates, however theres broken csx diagnostic tests still. * Fixed custom code actions. * Testfixes. * Small review fixes and simplified assembly loader algorithm. * Mergefix. * Fixed changed MiscFile project name. * Renamed service with better name and fixed missing language for analysis. * Review fixes for code fix provider. * Small tweaks for linq. * Immutablity to csharpdiagnostic service. * Comment to explain non self descriptive initial wait. * Support for roslyn 'IDE' analyzers. * Testfixes and added test that IDE analyzers are enabled. * Better comment on code based on review. * Testfix for signed project. * Testfix. * Small test tweak. * Buildfix. * Tweaks for issue where workspace updates comes after request. * Added assert to protect possibly internal changes of roslyn. * Increased timeout and added comment about asserting. * Further tweaked timeouts on event mechanism asserts. * Increased another 'assert' timeout. * Fix for threading issue in test utility. * Trigger to test build stability * Trigger to test build stability. * Trigger to test build stability. * Yet another attempt to get build execute. * Trigger build * Added original caller name tracking for OmnisharpTestHostDisposing. * Attempt to improve robustness of tests. * Moved tool to test utilities. * Added missing file. * Test build robustnes * Test build robustnes * Fix for possible null ref issue. * Fixed mistake on exception handling when using WhenAll. * Trigger build * Added fallback code to CodeCheckService, next need to figure out how to configure it. * Removed duplicate code. * Added flag to options. * Use expiremental analysis as default during testing. * Disabled CsharpDiagnosticService workers if not enabled. * Buildfix. * Fix for codefix support when analyzers are disabled. * Updated flag name. * Fixed default. * Renamed flag. * Initial structure divide for testability. * Few tests. * More tests for queue functionality. * Improved functionality to match exceptations. * Move towards diagnosis which can be switched by common interface. * Refactored ugly if switching of diagnostics behind common class. * Implementation of api in worker with analyzers. * Small refactoring. * Added logging when codefix provider cannot be created. * Moved to more robust time control mechanism. * Throttling period refactoring. * Small review fix. * Small review update. * Typofix. * Removed unused member. * Testfix. * Testfix. * Restored sdk version to global.json. * Added test for multiple thead execution of queue. * Parametrized tests to test both non roslyn analysis and with analysis. * Attempt to remove retry from asserts. * Removed unused code and restored correct global.json. * File rename. * Added test to queue facts. * Conditional action facts with and without analyzers. * Small refactoring. * Fix for lsp merge. * Initial version of single file analysis. * Fixes and tweaks for analysis, timeouts and error handling. * Testfixes. * Testfixes. * Correct global.json. * Reduced clutter from message. * Build stability testing. * Testfix. * Test tweak. * Reattempt with travis builds. * Threading fix. * Restored task based version to fix possible deadlock with xunit scheduler. * Retest builds. * Added skip to possibly hanging cake tests as test. * Skipped more cake tests as test. * Restored some cake tests to find correct hanging one. * Restored tests to see which one is broken one. * Restored CodeCheckFacts * Skipped code checks again because built was aborted. * CodeCheckFacts from cake tests unignored. * Restored Can_get_code_actions_from_roslyn to check if it is hanging one. * Refactored initialization routine for diagnostics and updated test defaults. * Bugfix. * Test build stability. * Tiny tweak for logging and comment. * Simplify method * Review fixes. * Small tweak, startup with larger projects. * Initial fixes for syntax analysis rulesets. * Initial fix for rulesets with syntax analysis. * Moved comment to correct location. * Logging improvement. * Test for CS rule apply. * Removed dummy variable. * Fix for document loading. * Fixed mistake on document fetching. * Attempt to fix duplicate key error. * Small refactoring. * Removed unnecessary semantic model get. * Fix for null ref error on document removal.
- Loading branch information
1 parent
0fcefe1
commit 62b3b52
Showing
44 changed files
with
1,723 additions
and
351 deletions.
There are no files selected for viewing
This file contains 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
22 changes: 21 additions & 1 deletion
22
src/OmniSharp.Abstractions/Models/v1/Diagnostics/DiagnosticLocation.cs
This file contains 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 |
---|---|---|
@@ -1,8 +1,28 @@ | ||
namespace OmniSharp.Models.Diagnostics | ||
using System.Collections.Generic; | ||
|
||
namespace OmniSharp.Models.Diagnostics | ||
{ | ||
public class DiagnosticLocation : QuickFix | ||
{ | ||
public string LogLevel { get; set; } | ||
public string Id { get; set; } | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
var location = obj as DiagnosticLocation; | ||
return location != null && | ||
base.Equals(obj) && | ||
LogLevel == location.LogLevel && | ||
Id == location.Id; | ||
} | ||
|
||
public override int GetHashCode() | ||
{ | ||
var hashCode = -1670479257; | ||
hashCode = hashCode * -1521134295 + base.GetHashCode(); | ||
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(LogLevel); | ||
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Id); | ||
return hashCode; | ||
} | ||
} | ||
} |
This file contains 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 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 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 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 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 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 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 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 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
Oops, something went wrong.