Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertk committed Oct 28, 2023
1 parent 7317046 commit 0fe61ea
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ dotnet_naming_symbols.constant_fields.required_modifiers = const
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 2
end_of_line = crlf
dotnet_diagnostic.CA2007.severity = suggestion
###############################
# C# Coding Conventions #
###############################
Expand Down Expand Up @@ -960,6 +961,7 @@ csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_prefer_primary_constructors = true:suggestion


[*.vb]
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ stages:

- template: ../steps/CoverageResults.yml
parameters:
reports: $(Build.SourcesDirectory)/artifacts/TestResults/**/coverage.cobertura.xml
reports: $(Build.SourcesDirectory)/**/coverage.cobertura.xml
configuration: $(_BuildConfig)
condition: and(succeeded(), eq(variables['_BuildConfig'], 'Debug'))
assemblyfilters: '-xunit'
Expand Down
5 changes: 5 additions & 0 deletions eng/azuredevops/pipelines/steps/CoverageResults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ steps:
verbosity: 'Verbose'
assemblyfilters: ${{parameters.assemblyfilters}}

- publish: '$(Build.SourcesDirectory)/artifacts/TestResults'
displayName: 'Publish TestResults Artifacts'
artifact: TestResults_$(Agent.Os)_$(_BuildConfig)
condition: ${{parameters.condition}}

- publish: '$(Build.SourcesDirectory)/artifacts/CoverageReport'
displayName: 'Publish CoverageReport Artifact'
artifact: CoverageResults_$(Agent.Os)_${{parameters.configuration}}
Expand Down
2 changes: 2 additions & 0 deletions src/RazorPages/RazorPagesIntro/Pages/Error.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public class ErrorModel : PageModel

public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);

#pragma warning disable S4487 // Unread "private" fields should be removed
private readonly ILogger<ErrorModel> _logger;
#pragma warning restore S4487 // Unread "private" fields should be removed

public ErrorModel(ILogger<ErrorModel> logger)
{
Expand Down
3 changes: 3 additions & 0 deletions src/RazorPages/RazorPagesIntro/Pages/Privacy.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ namespace RazorPagesIntro.Pages
{
public class PrivacyModel : PageModel
{
#pragma warning disable S4487 // Unread "private" fields should be removed
private readonly ILogger<PrivacyModel> _logger;
#pragma warning restore S4487 // Unread "private" fields should be removed

public PrivacyModel(ILogger<PrivacyModel> logger)
{
Expand All @@ -14,6 +16,7 @@ public PrivacyModel(ILogger<PrivacyModel> logger)

public void OnGet()
{
// to be populated
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public class PartialsModel : PageModel
{
public void OnGet()
{
// to be populated
}

public IActionResult OnGetPartial() => Partial("_Partial");
Expand Down
4 changes: 4 additions & 0 deletions src/RazorPages/RazorPagesTestSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

namespace RazorPagesTestSample
{
#pragma warning disable CA1052 // Static holder types should be Static or NotInheritable
#pragma warning disable S1118
public class Program
#pragma warning restore S1118
#pragma warning restore CA1052 // Static holder types should be Static or NotInheritable
{
public static void Main(string[] args)
{
Expand Down

0 comments on commit 0fe61ea

Please sign in to comment.