Skip to content

Commit

Permalink
Run dotnet format (#561)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonerdo authored Sep 21, 2019
1 parent 182766e commit f24b9d5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private string[] ParseReportFormats(XmlElement configurationElement)
.Where(format => !string.IsNullOrEmpty(format)).ToArray();
}

return formats is null || formats.Length == 0 ? new[] {CoverletConstants.DefaultReportFormat} : formats;
return formats is null || formats.Length == 0 ? new[] { CoverletConstants.DefaultReportFormat } : formats;
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/coverlet.msbuild.tasks/InstrumentationTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public override bool Execute()
var excludeFilters = _exclude?.Split(',');
var excludedSourceFiles = _excludeByFile?.Split(',');
var excludeAttributes = _excludeByAttribute?.Split(',');
var fileSystem = (IFileSystem) DependencyInjection.Current.GetService(typeof(IFileSystem));
var fileSystem = (IFileSystem)DependencyInjection.Current.GetService(typeof(IFileSystem));

Coverage coverage = new Coverage(_path,
includeFilters,
Expand All @@ -118,7 +118,7 @@ public override bool Execute()
_mergeWith,
_useSourceLink,
_logger,
(IInstrumentationHelper) DependencyInjection.Current.GetService(typeof(IInstrumentationHelper)),
(IInstrumentationHelper)DependencyInjection.Current.GetService(typeof(IInstrumentationHelper)),
fileSystem);

CoveragePrepareResult prepareResult = coverage.PrepareModules();
Expand Down
6 changes: 3 additions & 3 deletions test/coverlet.collector.tests/CoverletSettingsParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ public void ParseShouldCorrectlyParseConfigurationElement()
}

[Theory]
[InlineData(" , json", 1, new []{ "json" })]
[InlineData(" , json, ", 1, new [] { "json" })]
[InlineData(" , json", 1, new[] { "json" })]
[InlineData(" , json, ", 1, new[] { "json" })]
[InlineData("json,cobertura", 2, new[] { "json", "cobertura" })]
[InlineData(" , json,, cobertura ", 2, new[] { "json", "cobertura" })]
[InlineData(" , json, , cobertura ", 2, new [] { "json", "cobertura" })]
[InlineData(" , json, , cobertura ", 2, new[] { "json", "cobertura" })]
public void ParseShouldCorrectlyParseMultipleFormats(string formats, int formatsCount, string[] expectedReportFormats)
{
var testModules = new List<string> { "abc.dll" };
Expand Down
3 changes: 2 additions & 1 deletion test/coverlet.core.tests/Samples/Samples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ public class ClassWithPropertyExcludedByObsoleteAttr
public class ClassWithSetterOnlyPropertyExcludedByObsoleteAttr
{
[Obsolete]
public string Property {
public string Property
{
set => _ = string.Empty;
}
}
Expand Down

0 comments on commit f24b9d5

Please sign in to comment.