Skip to content

Commit

Permalink
Resolved most of the warnings in codefactor
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKert committed Apr 27, 2019
1 parent ea508d5 commit f4de254
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 26 deletions.
5 changes: 1 addition & 4 deletions src/BuildVision.Common/Properties/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@

// This file is used by Code Analysis to maintain SuppressMessage
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1305:Specify IFormatProvider", Justification = "<Pending>", Scope = "member", Target = "~M:BuildVision.Common.FilePathHelper.ShortenPath(System.String,System.Int32)~System.String")]

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:BuildVision.Common.Diagnostics.SessionTelemetry.#ctor")]
5 changes: 1 addition & 4 deletions src/BuildVision.Contracts/Properties/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@

// This file is used by Code Analysis to maintain SuppressMessage
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1305:Specify IFormatProvider", Justification = "<Pending>", Scope = "member", Target = "~P:BuildVision.Contracts.Exceptions.PropertyNotFoundException.Message")]

Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
}
}
}

5 changes: 1 addition & 4 deletions src/BuildVision.UI/Properties/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

// This file is used by Code Analysis to maintain SuppressMessage
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1305:Specify IFormatProvider", Justification = "<Pending>", Scope = "member", Target = "~F:BuildVision.UI.Components.SpinnerControl.FormattedValuePropertyKey")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1305:Specify IFormatProvider", Justification = "<Pending>", Scope = "member", Target = "~F:BuildVision.UI.Extensions.VectorResources._baseUri")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1305:Specify IFormatProvider", Justification = "<Pending>", Scope = "member", Target = "~M:BuildVision.UI.Converters.DataGridLengthStringConverter.Convert(System.Object,System.Type,System.Object,System.Globalization.CultureInfo)~System.Object")]
Expand All @@ -25,7 +23,6 @@
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1305:Specify IFormatProvider", Justification = "<Pending>", Scope = "member", Target = "~P:BuildVision.UI.Settings.Models.BuildMessagesSettings.DateTimeFormat")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1305:Specify IFormatProvider", Justification = "<Pending>", Scope = "member", Target = "~P:BuildVision.UI.Settings.Models.BuildMessagesSettings.ExtraMessageStringFormat")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1305:Specify IFormatProvider", Justification = "<Pending>", Scope = "member", Target = "~P:BuildVision.UI.Settings.Models.BuildMessagesSettings.TimeSpanFormat")]

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:BuildVision.UI.Converters.DataGridLengthStringConverter.ConvertBack(System.Object,System.Type,System.Object,System.Globalization.CultureInfo)~System.Object")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:BuildVision.UI.Converters.GridColumnSettingsToColumnExampleValueConverter.FormatExample(System.Object,System.String)~System.String")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:BuildVision.UI.Converters.MultiBindingStringFormatConverter.Convert(System.Object[],System.Type,System.Object,System.Globalization.CultureInfo)~System.Object")]
Expand Down
1 change: 0 additions & 1 deletion src/BuildVision/Core/BuildVisionPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public sealed class BuildVisionPackage : AsyncPackage, IVsPackageDynamicToolOwne
private ILogger _logger = LogManager.ForContext<BuildVisionPackage>();
public static ToolWindowPane ToolWindowPane { get; set; }


public ControlSettings ControlSettings { get; set; }

public BuildVisionPackage()
Expand Down
1 change: 0 additions & 1 deletion src/BuildVision/Core/SolutionBuildEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace BuildVision.Core
{

public class SolutionBuildEvents : IVsUpdateSolutionEvents2, IVsUpdateSolutionEvents4
{
private readonly ISolutionProvider _solutionProvider;
Expand Down
1 change: 0 additions & 1 deletion src/BuildVision/Helpers/ProjectExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@ public static bool IsDirty(this Project project)
return false;
}


public static string GetTreePath(this Project project, bool includeSelfProjectName = true)
{
var path = new StringBuilder();
Expand Down
1 change: 0 additions & 1 deletion src/BuildVision/Helpers/SolutionProjectsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ public static IList<ProjectItem> GetProjectItems(this Solution solution)
LogManager.ForContext<Solution>().Error(ex, "Failed to get projectitems for solution {FullName}", solution?.FullName);
}


var projectItems = new List<ProjectItem>(dteProjects.Count);
foreach (var project in dteProjects)
{
Expand Down
5 changes: 1 addition & 4 deletions src/BuildVision/Properties/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

// This file is used by Code Analysis to maintain SuppressMessage
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1305:Specify IFormatProvider", Justification = "<Pending>", Scope = "member", Target = "~M:BuildVision.Helpers.ProjectExtensions.GetFrameworkString(EnvDTE.Project)~System.String")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1305:Specify IFormatProvider", Justification = "<Pending>", Scope = "member", Target = "~M:BuildVision.Helpers.ProjectExtensions.GetProjectTypeFromRegistry(System.String,System.String)~System.String")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1305:Specify IFormatProvider", Justification = "<Pending>", Scope = "member", Target = "~M:BuildVision.Tool.Building.BuildService.GetCopyBuildOutputFilesToClipboardActionMessage(System.String,System.String[])~System.String")]

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:BuildVision.Core.BuildInformationProvider.BuildOutputLogger_OnErrorRaised(BuildVision.UI.Contracts.BuildProjectContextEntry,System.Object,BuildVision.Contracts.ErrorLevel)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:BuildVision.Core.BuildInformationProvider.ProjectBuildStarted(BuildVision.UI.Models.IProjectItem,BuildVision.Contracts.BuildAction)")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:BuildVision.Core.SolutionProvider.RefrehSolutionModel")]
Expand Down
2 changes: 0 additions & 2 deletions src/BuildVision/Services/BuildService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
using Microsoft.VisualStudio.Shell;
using Serilog;
using BuildVision.Extensions;
using BuildVision.Core;

namespace BuildVision.Tool.Building
{
Expand Down Expand Up @@ -105,7 +104,6 @@ public void RaiseCommandForSelectedProject(IProjectItem selectedProjectItem, int
}
}


private void RaiseCommand(VSConstants.VSStd97CmdID command)
{
try
Expand Down
2 changes: 1 addition & 1 deletion src/BuildVision/Services/TaskBarInfoService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void UpdateTaskBarInfo(BuildState buildState, BuildScope buildScope, int
return;
}

_taskbarItemInfo.Value.ProgressState = buildState.ToTaskBarItemProgressState(buildScope); ;
_taskbarItemInfo.Value.ProgressState = buildState.ToTaskBarItemProgressState(buildScope);

if (projectsCount <= 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using BuildVision.UI.Settings.Models;
using System.Runtime.InteropServices;


namespace BuildVision.Views.Settings
{
[ClassInterface(ClassInterfaceType.AutoDual)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ public void IsUserMessage_ShouldReturn_False_If_ForCombinations(LoggerVerbosity
}
}
}

0 comments on commit f4de254

Please sign in to comment.