зеркало из https://github.com/dotnet/razor.git
Remove unnecessary variable assignments (#10428)
This commit is contained in:
Родитель
2f0f5fc72b
Коммит
8071442667
|
@ -0,0 +1,4 @@
|
|||
is_global = true
|
||||
|
||||
# IDE0059: Remove unnecessary value assignment
|
||||
dotnet_diagnostic.IDE0059.severity = warning
|
|
@ -76,7 +76,7 @@ internal sealed class MapCodeEndpoint(
|
|||
}
|
||||
|
||||
private async Task<WorkspaceEdit?> HandleMappingsAsync(VSInternalMapCodeMapping[] mappings, Guid mapCodeCorrelationId, CancellationToken cancellationToken)
|
||||
{
|
||||
{
|
||||
using var _ = ArrayBuilderPool<TextDocumentEdit>.GetPooledObject(out var changes);
|
||||
foreach (var mapping in mappings)
|
||||
{
|
||||
|
@ -316,7 +316,7 @@ internal sealed class MapCodeEndpoint(
|
|||
[nodeToMap.ToFullString()],
|
||||
FocusLocations: focusLocations);
|
||||
|
||||
WorkspaceEdit? edits = null;
|
||||
WorkspaceEdit? edits;
|
||||
try
|
||||
{
|
||||
edits = await _clientConnection.SendRequestAsync<DelegatedMapCodeParams, WorkspaceEdit?>(
|
||||
|
|
|
@ -25,11 +25,9 @@ internal sealed class RazorConfigurationFormatter : ValueFormatter<RazorConfigur
|
|||
|
||||
count -= 2;
|
||||
|
||||
var forceRuntimeCodeGeneration = false;
|
||||
|
||||
if (reader.NextMessagePackType is MessagePackType.Boolean)
|
||||
{
|
||||
forceRuntimeCodeGeneration = reader.ReadBoolean();
|
||||
reader.ReadBoolean(); // forceRuntimeCodeGeneration
|
||||
count -= 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,6 @@ internal class DefaultLSPRequestInvoker : LSPRequestInvoker
|
|||
throw new ArgumentException("message", nameof(method));
|
||||
}
|
||||
|
||||
var serializedParams = JToken.FromObject(parameters);
|
||||
var response = await _languageServiceBroker.RequestAsync(
|
||||
new GeneralRequest<TIn, TOut> { LanguageServerName = languageServerName, Method = method, Request = parameters },
|
||||
cancellationToken);
|
||||
|
|
|
@ -177,7 +177,6 @@ public abstract class IntegrationTestBase
|
|||
throw new XunitException($"The resource {sourceFileName} was not found.");
|
||||
}
|
||||
var fileContent = testFile.ReadAllText();
|
||||
var normalizedContent = NormalizeNewLines(fileContent);
|
||||
|
||||
var workingDirectory = Path.GetDirectoryName(fileName);
|
||||
var fullPath = sourceFileName;
|
||||
|
|
|
@ -235,7 +235,6 @@ public abstract class RazorBaselineIntegrationTestBase : RazorIntegrationTestBas
|
|||
|
||||
private static void WriteBaseline(string text, string filePath)
|
||||
{
|
||||
var lines = text.Replace("\r", "").Replace("\n", "\r\n");
|
||||
File.WriteAllText(filePath, text, _baselineEncoding);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче