Skip to content

Commit

Permalink
Enabled sonarcloud again on Protocol & Protocol.Features. Made a lot …
Browse files Browse the repository at this point in the history
…of stuff internal as they aren't needed externally.
  • Loading branch information
MichielOda committed Dec 28, 2023
1 parent 0eacdd5 commit fbb768c
Show file tree
Hide file tree
Showing 540 changed files with 1,798 additions and 1,751 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/// </summary>
/// <seealso cref="System.Attribute" />
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class MaxDataMinerVersionsAttribute : Attribute
internal sealed class MaxDataMinerVersionsAttribute : Attribute
{
public MaxDataMinerVersionsAttribute(string mainRelease, string featureRelease)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/// </summary>
/// <seealso cref="System.Attribute" />
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class MinDataMinerVersionsAttribute : Attribute
internal sealed class MinDataMinerVersionsAttribute : Attribute
{
public MinDataMinerVersionsAttribute(string mainRelease, string featureRelease)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,36 @@
using System;
using System.Runtime.Serialization;

/// <summary>
/// Represents errors that occur during application execution.
/// </summary>
/// <seealso cref="System.Exception" />
[Serializable]
public class DataMinerVersionCheckException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="DataMinerVersionCheckException"/> class.
/// </summary>
public DataMinerVersionCheckException() { }

/// <summary>
/// Initializes a new instance of the <see cref="DataMinerVersionCheckException"/> class.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public DataMinerVersionCheckException(string message) : base(message) { }

/// <summary>
/// Initializes a new instance of the <see cref="DataMinerVersionCheckException"/> class.
/// </summary>
/// <param name="message">The message.</param>
/// <param name="inner">The inner.</param>
public DataMinerVersionCheckException(string message, Exception inner) : base(message, inner) { }

/// <summary>
/// Initializes a new instance of the <see cref="DataMinerVersionCheckException"/> class.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"></see> that contains contextual information about the source or destination.</param>
protected DataMinerVersionCheckException(SerializationInfo info, StreamingContext context) : base(info, context) { }
}
}
2 changes: 1 addition & 1 deletion Protocol.Features/Common/Feature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using Skyline.DataMiner.CICD.Common;

// Inherits IFeature so it always will have the info if we add extra.
public class Feature : IFeature
internal class Feature : IFeature
{
private readonly IFeatureCheck featureCheck;
private readonly MinDataMinerVersionsAttribute minDmaVersionAttribute;
Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Common/FeatureCheckContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Skyline.DataMiner.CICD.Models.Protocol.Read.Interfaces;
using Skyline.DataMiner.CICD.Validators.Common.Interfaces;

public class FeatureCheckContext
internal class FeatureCheckContext
{
public FeatureCheckContext(IProtocolInputData input, IReadOnlyDictionary<ProjectId, CompiledQActionProject> compiledQActions, bool isSolutionBased)
{
Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Common/FeatureCheckContextExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Skyline.DataMiner.CICD.Models.Protocol;
using Skyline.DataMiner.CICD.Models.Protocol.Read;

public static class FeatureCheckContextExtensions
internal static class FeatureCheckContextExtensions
{
public static IEnumerable<(IQActionsQAction qaction, SyntaxTree syntaxTree, SemanticModel semanticModel)> EachQActionProjectsAndSyntaxTreesAndModels(this FeatureCheckContext context)
{
Expand Down
8 changes: 7 additions & 1 deletion Protocol.Features/Common/Interfaces/IDmaCheckResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
{
using System.Collections.Generic;

/// <summary>
/// Holds the features that are used.
/// </summary>
public interface IDmaVersionCheckResults
{
IReadOnlyCollection<Feature> Features { get; }
/// <summary>
/// Gets the features that are used.
/// </summary>
IReadOnlyCollection<IFeature> Features { get; }
}
}
13 changes: 0 additions & 13 deletions Protocol.Features/Common/Interfaces/IDmaVersionCheckResult.cs

This file was deleted.

12 changes: 12 additions & 0 deletions Protocol.Features/Common/Interfaces/IFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,24 @@
{
using System.Collections.Generic;

/// <summary>
/// Represents a feature.
/// </summary>
public interface IFeature
{
/// <summary>
/// Gets the title.
/// </summary>
string Title { get; }

/// <summary>
/// Gets the description.
/// </summary>
string Description { get; }

/// <summary>
/// Gets the release notes.
/// </summary>
IReadOnlyCollection<uint> ReleaseNotes { get; }
}
}
2 changes: 1 addition & 1 deletion Protocol.Features/Common/Interfaces/IFeatureCheck.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SLDisDmFeatureCheck.Common.Interfaces
{
public interface IFeatureCheck : IFeature
internal interface IFeatureCheck : IFeature
{
IFeatureCheckResult CheckIfUsed(FeatureCheckContext context);
}
Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Common/Interfaces/IFeatureCheckResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Collections.Generic;
using Results;

public interface IFeatureCheckResult
internal interface IFeatureCheckResult
{
bool IsUsed { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Skyline.DataMiner.CICD.CSharpAnalysis.Interfaces;
using Skyline.DataMiner.CICD.Models.Protocol.Read;

public class CSharpFeatureCheckResultItem : FeatureCheckResultItem
internal class CSharpFeatureCheckResultItem : FeatureCheckResultItem
{
public ICSharpObject<SyntaxNode> CSharp { get; }

Expand Down
4 changes: 2 additions & 2 deletions Protocol.Features/Common/Results/DmaVersionCheckResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
using System.Collections.Generic;
using SLDisDmFeatureCheck.Common.Interfaces;

public class DmaVersionCheckResults : IDmaVersionCheckResults
internal class DmaVersionCheckResults : IDmaVersionCheckResults
{
internal DmaVersionCheckResults()
{
Features = new List<Feature>();
}

public IReadOnlyCollection<Feature> Features { get; internal set; }
public IReadOnlyCollection<IFeature> Features { get; internal set; }
}
}
2 changes: 1 addition & 1 deletion Protocol.Features/Common/Results/FeatureCheckResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

using Skyline.DataMiner.CICD.Models.Protocol.Read;

public class FeatureCheckResult : IFeatureCheckResult
internal class FeatureCheckResult : IFeatureCheckResult
{
internal FeatureCheckResult()
{
Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Common/Results/FeatureCheckResultItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using Skyline.DataMiner.CICD.Models.Protocol.Read;

public class FeatureCheckResultItem
internal class FeatureCheckResultItem
{
public IReadable Node { get; }

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.0/Dashboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Skyline.DataMiner.CICD.Models.Protocol.Read;

//[MinDataMinerVersions("10.0.0.0-9118", "9.6.11.0-8649")]
public class Dashboard : IFeatureCheck
internal class Dashboard : IFeatureCheck
{
public string Title => "Dashboard";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Skyline.DataMiner.CICD.Models.Protocol.Read;

//[MinDataMinerVersions("10.0.0.0-9118", "9.6.1.0-7839")]
public class DynamicParameterReplication : IFeatureCheck
internal class DynamicParameterReplication : IFeatureCheck
{
public string Title => "Dynamic Parameter Replication";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.0/Exposer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Skyline.DataMiner.CICD.Models.Protocol.Read;

//[MinDataMinerVersions("10.0.0.0-9118", "9.6.5.0-8250")]
public class Exposer : IFeatureCheck
internal class Exposer : IFeatureCheck
{
public string Title => "Exposer";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.0/GetPkIdByTableId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.0.0.0-9118", "9.6.13.0-8820")]
public class GetPkIdByTableId : IFeatureCheck
internal class GetPkIdByTableId : IFeatureCheck
{
public string Title => "Get PK ID by Table ID";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.0/GetTableIdByColumnId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.0.0.0-9118", "9.6.13.0-8820")]
public class GetTableIdByColumnId : IFeatureCheck
internal class GetTableIdByColumnId : IFeatureCheck
{
public string Title => "Get Table ID by Column ID";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.0.0.0-9118", "9.6.6.0-8270")]
public class HistorySets_FillArrayNoDelete_Bulk : IFeatureCheck
internal class HistorySets_FillArrayNoDelete_Bulk : IFeatureCheck
{
public string Title => "History Sets - FillArrayNoDelete - Bulk";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.0.0.0-9118", "9.6.6.0-8270")]
public class HistorySets_FillArrayWithColumn_Bulk : IFeatureCheck
internal class HistorySets_FillArrayWithColumn_Bulk : IFeatureCheck
{
public string Title => "History Sets - FillArrayWithColumn - Bulk";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.0.0.0-9118", "9.6.6.0-8270")]
public class HistorySets_FillArray_Bulk : IFeatureCheck
internal class HistorySets_FillArray_Bulk : IFeatureCheck
{
public string Title => "History Sets - FillArray - Bulk";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using SLDisDmFeatureCheck.Common.Results;

// [MinDataMinerVersions("10.0.0.0-9118", "9.6.13.0-8820")]
public class HistorySets_FillArray_Single/* : IFeatureCheck*/
internal class HistorySets_FillArray_Single/* : IFeatureCheck*/
{
public string Title => "History Sets - FillArray - Single";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.0/ProtocolTtlSyntax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Skyline.DataMiner.CICD.Models.Protocol.Read;

//[MinDataMinerVersions("10.0.0.0-9118", "9.6.3.0-8092")]
public class ProtocolTtlSyntax : IFeatureCheck
internal class ProtocolTtlSyntax : IFeatureCheck
{
public string Title => "Protocol TTL Syntax";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.0/SkipInDiagram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using SLDisDmFeatureCheck.Common.Attributes;

//[MinDataMinerVersions("10.0.0.0-9118", "9.6.4.0-8151")]
public class SkipInDiagram : IFeatureCheck
internal class SkipInDiagram : IFeatureCheck
{
public string Title => "SkipInDiagram";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.0/Tooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Skyline.DataMiner.CICD.Models.Protocol.Read;

//[MinDataMinerVersions("10.0.0.0-9118", "9.6.11.0-8649")]
public class Tooltip : IFeatureCheck
internal class Tooltip : IFeatureCheck
{
public string Title => "Tooltip";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.0/ValueMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Skyline.DataMiner.CICD.Models.Protocol.Read;

//[MinDataMinerVersions("10.0.0.0-9118", "10.0.2.0-8924")]
public class ValueMapping : IFeatureCheck
internal class ValueMapping : IFeatureCheck
{
public string Title => "ValueMapping";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.1.0.0-9966", "10.0.3.0-8964")]
public class DeleteFolder_RecycleOption : IFeatureCheck
internal class DeleteFolder_RecycleOption : IFeatureCheck
{
public string Title => "Delete Folder - Recycle Option";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.1/DynamicUnits.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.1.0.0-9966", "10.0.9.0-9385")]
public class DynamicUnits : IFeatureCheck
internal class DynamicUnits : IFeatureCheck
{
public string Title => "Dynamic Units";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.1/ExecuteScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.1.0.0-9966", "10.0.5.0-9164")]
public class ExecuteScript : IFeatureCheck
internal class ExecuteScript : IFeatureCheck
{
public string Title => "ExecuteScript";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.1/InternalLicenses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.1.0.0-9966", "10.0.13.0-9784")]
public class InternalLicenses : IFeatureCheck
internal class InternalLicenses : IFeatureCheck
{
public string Title => "Internal Licenses";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.1/LoginMethod_Certificate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.1.0.0-9966", "10.0.5.0-9164")]
public class LoginMethod_Certificate : IFeatureCheck
internal class LoginMethod_Certificate : IFeatureCheck
{
public string Title => "Login Method - Certificate";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.1/MatrixLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.1.0.0-9966", "10.0.8.0-9300")]
public class MatrixLayout : IFeatureCheck
internal class MatrixLayout : IFeatureCheck
{
public string Title => "Matrix Layout";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.1/NuGet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.1.0.0-9966", "10.0.10.0-9454")]
public class NuGetPackages : IFeatureCheck
internal class NuGetPackages : IFeatureCheck
{
public string Title => "NuGet packages";

Expand Down
2 changes: 1 addition & 1 deletion Protocol.Features/Features/10.1/ProfileHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
using SLDisDmFeatureCheck.Common.Results;

//[MinDataMinerVersions("10.1.0.0-9966", "10.0.8.0-9300")]
public class ProfileHelper : IFeatureCheck
internal class ProfileHelper : IFeatureCheck
{
public string Title => "ProfileHelper";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using Skyline.DataMiner.CICD.Models.Protocol.Read;

[MinDataMinerVersions("10.2.0.0-11517", "10.1.3.0-9963")]
public class Chain_DefaultSelectionField : IFeatureCheck
internal class Chain_DefaultSelectionField : IFeatureCheck
{
public string Title => "Chain Default Selection Field";

Expand Down
Loading

0 comments on commit fbb768c

Please sign in to comment.