Skip to content

Commit

Permalink
Merge pull request #1533 from qdraw/feature/GlobalSupressions
Browse files Browse the repository at this point in the history
// GlobalSuppressions.cs && add more time for main pipeline
  • Loading branch information
qdraw authored Apr 4, 2024
2 parents 537b1d1 + 636b0f3 commit cdde545
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pipelines/azure/develop-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ stages:
jobs:
- job: buildnetcore
displayName: 'Build'
timeoutInMinutes: 25 # how long to run the job before automatically cancelling
timeoutInMinutes: 30 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 10 # how much time to give 'run always even if cancelled tasks' before stopping them
pool:
vmImage: 'ubuntu-22.04'
Expand Down
3 changes: 3 additions & 0 deletions starsky/build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ namespace build;
[SuppressMessage("Sonar",
"S2629: Don't use string interpolation in logging message templates",
Justification = "Not production code.")]
[SuppressMessage("Sonar",
"S6664: Reduce the number of Information logging calls within this code block",
Justification = "Not production code.")]
[ShutdownDotNetAfterServerBuild]
public sealed class Build : NukeBuild
{
Expand Down
4 changes: 4 additions & 0 deletions starsky/build/helpers/DotnetGenericHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using build;
using Nuke.Common.ProjectModel;
Expand All @@ -9,6 +10,9 @@

namespace helpers
{
[SuppressMessage("Sonar",
"S6664: Reduce the number of Information logging calls within this code block",
Justification = "Not production code.")]
public static class DotnetGenericHelper
{
/// <summary>
Expand Down
4 changes: 4 additions & 0 deletions starsky/build/helpers/DotnetTestHelper.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using System.IO;
using build;
using Nuke.Common.IO;
Expand All @@ -9,6 +10,9 @@

namespace helpers
{
[SuppressMessage("Sonar",
"S6664: Reduce the number of Information logging calls within this code block",
Justification = "Not production code.")]
public static class DotnetTestHelper
{
static bool DirectoryExists(string path)
Expand Down
3 changes: 3 additions & 0 deletions starsky/build/helpers/SonarQube.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ namespace helpers
[SuppressMessage("Sonar",
"S2629: Don't use string interpolation in logging message templates",
Justification = "Not production code.")]
[SuppressMessage("Sonar",
"S6664: Reduce the number of Information logging calls within this code block",
Justification = "Not production code.")]
public static class SonarQube
{
public const string SonarQubePackageName = "dotnet-sonarscanner";
Expand Down
3 changes: 3 additions & 0 deletions starsky/build/helpers/TrxParserHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

namespace helpers;

[SuppressMessage("Sonar",
"S6664: Reduce the number of Information logging calls within this code block",
Justification = "Not production code.")]
public static class TrxParserHelper
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.Diagnostics.CodeAnalysis;

// GlobalSuppressions.cs

// S1309: Do not suppress issues.
[assembly:
SuppressMessage("Sonar", "S1309",
Expand Down
12 changes: 12 additions & 0 deletions starsky/starsky/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System.Diagnostics.CodeAnalysis;

// GlobalSuppressions.cs

// S6931:Change the paths of the actions of this controller to be relative
// and add a controller route with the common prefix.
[assembly:
SuppressMessage("Sonar", "S6931",
Justification =
"Change the paths of the actions of this controller to be relative and " +
"add a controller route with the common prefix.",
Scope = "module")]
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class UpdateRelativeObject {
setRelativeObjects(result.data);
resolve(result.data);
})
.catch((err) => {
.catch((err: Error) => {
console.error(err);
rejects(err);
});
Expand Down

1 comment on commit cdde545

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.