diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.Tests/Cake.Frosting.Issues.Recipe.Tests.csproj b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.Tests/Cake.Frosting.Issues.Recipe.Tests.csproj index 54913e4b..9bd5f1a4 100644 --- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.Tests/Cake.Frosting.Issues.Recipe.Tests.csproj +++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.Tests/Cake.Frosting.Issues.Recipe.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.csproj b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.csproj index b3c7c9d6..fe33a92f 100644 --- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.csproj +++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.csproj @@ -25,7 +25,7 @@ For recipe compatible with Cake Script Runners see Cake.Issues.Recipe.MIT git https://github.com/cake-contrib/Cake.Issues.Recipe.git - https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/4.9.0 + https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/4.10.0 @@ -42,20 +42,20 @@ For recipe compatible with Cake Script Runners see Cake.Issues.Recipe. - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IIssuesParametersInputFiles.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IIssuesParametersInputFiles.cs index 86a80318..f4075eaa 100644 --- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IIssuesParametersInputFiles.cs +++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IIssuesParametersInputFiles.cs @@ -10,47 +10,88 @@ public interface IIssuesParametersInputFiles /// /// Gets list of registered paths to MSBuild log files created by XmlFileLogger. /// - IDictionary MsBuildXmlFileLoggerLogFilePaths { get; } + IDictionary MsBuildXmlFileLoggerLogFilePaths { get; } + + /// + /// Gets list of registered content of MSBuild log files created by XmlFileLogger. + /// + IDictionary MsBuildXmlFileLoggerLogFileContent { get; } /// /// Gets list of registered paths to MSBuild binary log files. /// - IDictionary MsBuildBinaryLogFilePaths { get; } + IDictionary MsBuildBinaryLogFilePaths { get; } + + /// + /// Gets list of registered content of MSBuild binary log files. + /// + IDictionary MsBuildBinaryLogFileContent { get; } /// /// Gets list of registered paths to InspectCode log files. /// - IDictionary InspectCodeLogFilePaths { get; } + IDictionary InspectCodeLogFilePaths { get; } + + /// + /// Gets list of registered content of InspectCode log files. + /// + IDictionary InspectCodeLogFileContent { get; } /// /// Gets list of registered paths to markdownlint-cli log files. /// IDictionary MarkdownlintCliLogFilePaths { get; } + /// + /// Gets list of registered content of markdownlint-cli log files. + /// + IDictionary MarkdownlintCliLogFileContent { get; } + /// /// Gets list of registered paths to markdownlint-cli log files created with --json. /// IDictionary MarkdownlintCliJsonLogFilePaths { get; } + /// + /// Gets list of registered content of markdownlint-cli log files created with --json. + /// + IDictionary MarkdownlintCliJsonLogFileContent { get; } + /// /// Gets list of registered paths to markdownlint log files in version 1. /// - IDictionary MarkdownlintV1LogFilePaths { get; } + IDictionary MarkdownlintV1LogFilePaths { get; } + + /// + /// Gets list of registered content of markdownlint log files in version 1. + /// + IDictionary MarkdownlintV1LogFileContent { get; } /// /// Gets list of registered paths to ESLint log files in JSON format. /// IDictionary EsLintJsonLogFilePaths { get; } + /// + /// Gets list of registered content of ESLint log files in JSON format. + /// + IDictionary EsLintJsonLogFileContent { get; } + /// /// Gets list of registered paths to SARIF log files. /// IDictionary SarifLogFilePaths { get; } + /// + /// Gets list of registered content of SARIF log files. + /// + IDictionary SarifLogFileContent { get; } + /// /// Adds a path to a MSBuild log file created by XmlFileLogger. /// /// Path to the MSBuild log file. + [Obsolete("Use AddMsBuildXmlFileLoggerLogFilePath")] void AddMsBuildXmlFileLoggerLogFile(FilePath logfilePath); /// @@ -58,12 +99,28 @@ public interface IIssuesParametersInputFiles /// /// Path to the MSBuild log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddMsBuildXmlFileLoggerLogFilePath")] void AddMsBuildXmlFileLoggerLogFile(FilePath logfilePath, IReadIssuesSettings settings); + /// + /// Adds a path to a MSBuild log file created by XmlFileLogger. + /// + /// Path to the MSBuild log file. + /// Settings for reading the log file. Null for default values. + void AddMsBuildXmlFileLoggerLogFilePath(FilePath logfilePath, IReadIssuesSettings settings); + + /// + /// Adds content of a MSBuild log file created by XmlFileLogger. + /// + /// Content of the MSBuild log file. + /// Settings for reading the log file. Null for default values. + void AddMsBuildXmlFileLoggerLogFileContent(byte[] logfileContent, IReadIssuesSettings settings); + /// /// Adds a path to a MSBuild binary log file. /// /// Path to the MSBuild log file. + [Obsolete("Use AddMsBuildBinaryLogFilePath")] void AddMsBuildBinaryLogFile(FilePath logfilePath); /// @@ -71,12 +128,28 @@ public interface IIssuesParametersInputFiles /// /// Path to the MSBuild log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddMsBuildBinaryLogFilePath")] void AddMsBuildBinaryLogFile(FilePath logfilePath, IReadIssuesSettings settings); + /// + /// Adds a path to a MSBuild binary log file. + /// + /// Path to the MSBuild log file. + /// Settings for reading the log file. Null for default values. + void AddMsBuildBinaryLogFilePath(FilePath logfilePath, IReadIssuesSettings settings); + + /// + /// Adds content of a MSBuild binary log file. + /// + /// Content of the MSBuild log file. + /// Settings for reading the log file. Null for default values. + void AddMsBuildBinaryLogFileContent(byte[] logfileContent, IReadIssuesSettings settings); + /// /// Adds a path to a InspectCode log file. /// /// Path to the InspectCode log file. + [Obsolete("Use AddInspectCodeLogFilePath")] void AddInspectCodeLogFile(FilePath logfilePath); /// @@ -84,12 +157,28 @@ public interface IIssuesParametersInputFiles /// /// Path to the InspectCode log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddInspectCodeLogFilePath")] void AddInspectCodeLogFile(FilePath logfilePath, IReadIssuesSettings settings); + /// + /// Adds a path to a InspectCode log file. + /// + /// Path to the InspectCode log file. + /// Settings for reading the log file. Null for default values. + void AddInspectCodeLogFilePath(FilePath logfilePath, IReadIssuesSettings settings); + + /// + /// Adds content of a InspectCode log file. + /// + /// Content of the InspectCode log file. + /// Settings for reading the log file. Null for default values. + void AddInspectCodeLogFileContent(byte[] logfileContent, IReadIssuesSettings settings); + /// /// Adds a path to a markdownlint-cli log file. /// /// Path to the markdownlint-cli log file. + [Obsolete("Use AddMarkdownlintCliLogFilePath")] void AddMarkdownlintCliLogFile(FilePath logfilePath); /// @@ -97,12 +186,28 @@ public interface IIssuesParametersInputFiles /// /// Path to the markdownlint-cli log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddMarkdownlintCliLogFilePath")] void AddMarkdownlintCliLogFile(FilePath logfilePath, IReadIssuesSettings settings); + /// + /// Adds a path to a markdownlint-cli log file. + /// + /// Path to the markdownlint-cli log file. + /// Settings for reading the log file. Null for default values. + void AddMarkdownlintCliLogFilePath(FilePath logfilePath, IReadIssuesSettings settings); + + /// + /// Adds content of a markdownlint-cli log file. + /// + /// Content of the markdownlint-cli log file. + /// Settings for reading the log file. Null for default values. + void AddMarkdownlintCliLogFileContent(byte[] logfileContent, IReadIssuesSettings settings); + /// /// Adds a path to a markdownlint-cli log file created with --json. /// /// Path to the markdownlint-cli log file. + [Obsolete("Use AddMarkdownlintCliJsonLogFilePath")] void AddMarkdownlintCliJsonLogFile(FilePath logfilePath); /// @@ -110,12 +215,28 @@ public interface IIssuesParametersInputFiles /// /// Path to the markdownlint-cli log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddMarkdownlintCliJsonLogFilePath")] void AddMarkdownlintCliJsonLogFile(FilePath logfilePath, IReadIssuesSettings settings); - + + /// + /// Adds a path to a markdownlint-cli log file created with --json. + /// + /// Path to the markdownlint-cli log file. + /// Settings for reading the log file. Null for default values. + void AddMarkdownlintCliJsonLogFilePath(FilePath logfilePath, IReadIssuesSettings settings); + + /// + /// Adds content of a markdownlint-cli log file created with --json. + /// + /// Content of the markdownlint-cli log file. + /// Settings for reading the log file. Null for default values. + void AddMarkdownlintCliJsonLogFileContent(byte[] logfileContent, IReadIssuesSettings settings); + /// /// Adds a path to a markdownlint log file in version 1. /// /// Path to the markdownlint log file. + [Obsolete("Use AddMarkdownlintV1LogFilePath")] void AddMarkdownlintV1LogFile(FilePath logfilePath); /// @@ -123,12 +244,28 @@ public interface IIssuesParametersInputFiles /// /// Path to the markdownlint log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddMarkdownlintV1LogFilePath")] void AddMarkdownlintV1LogFile(FilePath logfilePath, IReadIssuesSettings settings); + /// + /// Adds a path to a markdownlint log file in version 1. + /// + /// Path to the markdownlint log file. + /// Settings for reading the log file. Null for default values. + void AddMarkdownlintV1LogFilePath(FilePath logfilePath, IReadIssuesSettings settings); + + /// + /// Adds content of a markdownlint log file in version 1. + /// + /// Content of the markdownlint log file. + /// Settings for reading the log file. Null for default values. + void AddMarkdownlintV1LogFileContent(byte[] logfileContent, IReadIssuesSettings settings); + /// /// Adds a path to a ESLint log file in JSON format. /// /// Path to the ESLint log file. + [Obsolete("Use AddEsLintJsonLogFilePath")] void AddEsLintJsonLogFile(FilePath logfilePath); /// @@ -136,12 +273,28 @@ public interface IIssuesParametersInputFiles /// /// Path to the ESLint log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddEsLintJsonLogFilePath")] void AddEsLintJsonLogFile(FilePath logfilePath, IReadIssuesSettings settings); + /// + /// Adds a path to a ESLint log file in JSON format. + /// + /// Path to the ESLint log file. + /// Settings for reading the log file. Null for default values. + void AddEsLintJsonLogFilePath(FilePath logfilePath, IReadIssuesSettings settings); + + /// + /// Adds content of a ESLint log file in JSON format. + /// + /// Content of the ESLint log file. + /// Settings for reading the log file. Null for default values. + void AddEsLintJsonLogFileContent(byte[] logfileContent, IReadIssuesSettings settings); + /// /// Adds a path to a log file in SARIF format. /// /// Path to the SARIF log file. + [Obsolete("Use AddSarifLogFilePath")] void AddSarifLogFile(FilePath logfilePath); /// @@ -149,6 +302,21 @@ public interface IIssuesParametersInputFiles /// /// Path to the SARIF log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddSarifLogFilePath")] void AddSarifLogFile(FilePath logfilePath, IReadIssuesSettings settings); + + /// + /// Adds a path to a log file in SARIF format. + /// + /// Path to the SARIF log file. + /// Settings for reading the log file. Null for default values. + void AddSarifLogFilePath(FilePath logfilePath, IReadIssuesSettings settings); + + /// + /// Adds content of a log file in SARIF format. + /// + /// Content of the SARIF log file. + /// Settings for reading the log file. Null for default values. + void AddSarifLogFileContent(byte[] logfileContent, IReadIssuesSettings settings); } } \ No newline at end of file diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IIssuesParametersInputFilesExtensions.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IIssuesParametersInputFilesExtensions.cs new file mode 100644 index 00000000..ade425ec --- /dev/null +++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IIssuesParametersInputFilesExtensions.cs @@ -0,0 +1,538 @@ +namespace Cake.Frosting.Issues.Recipe +{ + using Cake.Core.IO; + + /// + /// Extensions for . + /// + public static class IIssuesParametersInputFilesExtensions + { + #region MsBuildXmlFileLoggerLogFile + + /// + /// Adds a path to a MSBuild log file created by XmlFileLogger. + /// + /// Parameter instance. + /// Path to the MSBuild log file. + public static void AddMsBuildXmlFileLoggerLogFilePath( + this IIssuesParametersInputFiles parameters, + FilePath logfilePath) + { + parameters.NotNull(); + logfilePath.NotNull(); + + parameters.AddMsBuildXmlFileLoggerLogFilePath(logfilePath, null); + } + + /// + /// Adds content of a MSBuild log file created by XmlFileLogger. + /// + /// Parameter instance. + /// Content of the MSBuild log file. + public static void AddMsBuildXmlFileLoggerLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrWhiteSpace(); + + parameters.AddMsBuildXmlFileLoggerLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a MSBuild log file created by XmlFileLogger. + /// + /// Parameter instance. + /// Content of the MSBuild log file. + public static void AddMsBuildXmlFileLoggerLogFileContent( + this IIssuesParametersInputFiles parameters, + byte[] logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddMsBuildXmlFileLoggerLogFileContent(logfileContent, null); + } + + /// + /// Adds content of a MSBuild log file created by XmlFileLogger. + /// + /// Parameter instance. + /// Content of the MSBuild log file. + /// Settings for reading the log file. Null for default values. + public static void AddMsBuildXmlFileLoggerLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent, + IReadIssuesSettings settings) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddMsBuildXmlFileLoggerLogFileContent(logfileContent.ToByteArray(), settings); + } + + #endregion + + #region MsBuildBinaryLogFile + + /// + /// Adds a path to a MSBuild binary log file. + /// + /// Parameter instance. + /// Path to the MSBuild log file. + public static void AddMsBuildBinaryLogFilePath( + this IIssuesParametersInputFiles parameters, + FilePath logfilePath) + { + parameters.NotNull(); + logfilePath.NotNull(); + + parameters.AddMsBuildBinaryLogFilePath(logfilePath, null); + } + + /// + /// Adds content of a MSBuild binary log file. + /// + /// Parameter instance. + /// Content of the MSBuild log file. + public static void AddMsBuildBinaryLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrWhiteSpace(); + + parameters.AddMsBuildBinaryLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a MSBuild binary log file. + /// + /// Parameter instance. + /// Content of the MSBuild log file. + public static void AddMsBuildBinaryLogFileContent( + this IIssuesParametersInputFiles parameters, + byte[] logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddMsBuildBinaryLogFileContent(logfileContent, null); + } + + /// + /// Adds content of a MSBuild binary log file. + /// + /// Parameter instance. + /// Content of the MSBuild log file. + /// Settings for reading the log file. Null for default values. + public static void AddMsBuildBinaryLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent, + IReadIssuesSettings settings) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddMsBuildBinaryLogFileContent(logfileContent.ToByteArray(), settings); + } + + #endregion + + #region InspectCodeLogFile + + /// + /// Adds a path to an InspectCode log file. + /// + /// Parameter instance. + /// Path to the InspectCode log file. + public static void AddInspectCodeLogFilePath( + this IIssuesParametersInputFiles parameters, + FilePath logfilePath) + { + parameters.NotNull(); + logfilePath.NotNull(); + + parameters.AddInspectCodeLogFilePath(logfilePath, null); + } + + /// + /// Adds content of an InspectCode log file. + /// + /// Parameter instance. + /// Content of the InspectCode log file. + public static void AddInspectCodeLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrWhiteSpace(); + + parameters.AddInspectCodeLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of an InspectCode log file. + /// + /// Parameter instance. + /// Content of the InspectCode log file. + public static void AddInspectCodeLogFileContent( + this IIssuesParametersInputFiles parameters, + byte[] logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddInspectCodeLogFileContent(logfileContent, null); + } + + /// + /// Adds content of an InspectCode log file. + /// + /// Parameter instance. + /// Content of the InspectCode log file. + /// Settings for reading the log file. Null for default values. + public static void AddInspectCodeLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent, + IReadIssuesSettings settings) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddInspectCodeLogFileContent(logfileContent.ToByteArray(), settings); + } + + #endregion + + #region MarkdownlintCliLogFile + + /// + /// Adds a path to a markdownlint-cli log file. + /// + /// Parameter instance. + /// Path to the markdownlint-cli log file. + public static void AddMarkdownlintCliLogFilePath( + this IIssuesParametersInputFiles parameters, + FilePath logfilePath) + { + parameters.NotNull(); + logfilePath.NotNull(); + + parameters.AddMarkdownlintCliLogFilePath(logfilePath, null); + } + + /// + /// Adds content of a markdownlint-cli log file. + /// + /// Parameter instance. + /// Content of the markdownlint-cli log file. + public static void AddMarkdownlintCliLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrWhiteSpace(); + + parameters.AddMarkdownlintCliLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a markdownlint-cli log file. + /// + /// Parameter instance. + /// Content of the markdownlint-cli log file. + public static void AddMarkdownlintCliLogFileContent( + this IIssuesParametersInputFiles parameters, + byte[] logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddMarkdownlintCliLogFileContent(logfileContent, null); + } + + /// + /// Adds content of a markdownlint-cli log file. + /// + /// Parameter instance. + /// Content of the markdownlint-cli log file. + /// Settings for reading the log file. Null for default values. + public static void AddMarkdownlintCliLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent, + IReadIssuesSettings settings) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddMarkdownlintCliLogFileContent(logfileContent.ToByteArray(), settings); + } + + #endregion + + #region MarkdownlintCliJsonLogFile + + /// + /// Adds a path to a markdownlint-cli log file created with --json. + /// + /// Parameter instance. + /// Path to the markdownlint-cli log file. + public static void AddMarkdownlintCliJsonLogFilePath( + this IIssuesParametersInputFiles parameters, + FilePath logfilePath) + { + parameters.NotNull(); + logfilePath.NotNull(); + + parameters.AddMarkdownlintCliJsonLogFilePath(logfilePath, null); + } + + /// + /// Adds content of a markdownlint-cli log file created with --json. + /// + /// Parameter instance. + /// Content of the markdownlint-cli log file. + public static void AddMarkdownlintCliJsonLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrWhiteSpace(); + + parameters.AddMarkdownlintCliJsonLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a markdownlint-cli log file created with --json. + /// + /// Parameter instance. + /// Content of the markdownlint-cli log file. + public static void AddMarkdownlintCliJsonLogFileContent( + this IIssuesParametersInputFiles parameters, + byte[] logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddMarkdownlintCliJsonLogFileContent(logfileContent, null); + } + + /// + /// Adds content of a markdownlint-cli log file created with --json. + /// + /// Parameter instance. + /// Content of the markdownlint-cli log file. + /// Settings for reading the log file. Null for default values. + public static void AddMarkdownlintCliJsonLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent, + IReadIssuesSettings settings) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddMarkdownlintCliJsonLogFileContent(logfileContent.ToByteArray(), settings); + } + + #endregion + + #region MarkdownlintV1LogFile + + /// + /// Adds a path to a markdownlint log file in version 1. + /// + /// Parameter instance. + /// Path to the markdownlint log file. + public static void AddMarkdownlintV1LogFilePath( + this IIssuesParametersInputFiles parameters, + FilePath logfilePath) + { + parameters.NotNull(); + logfilePath.NotNull(); + + parameters.AddMarkdownlintV1LogFilePath(logfilePath, null); + } + + /// + /// Adds content of a markdownlint log file in version 1. + /// + /// Parameter instance. + /// Content of the markdownlint log file. + public static void AddMarkdownlintV1LogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrWhiteSpace(); + + parameters.AddMarkdownlintV1LogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a markdownlint log file in version 1. + /// + /// Parameter instance. + /// Content of the markdownlint log file. + public static void AddMarkdownlintV1LogFileContent( + this IIssuesParametersInputFiles parameters, + byte[] logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddMarkdownlintV1LogFileContent(logfileContent, null); + } + + /// + /// Adds content of a markdownlint log file in version 1. + /// + /// Parameter instance. + /// Content of the markdownlint log file. + /// Settings for reading the log file. Null for default values. + public static void AddMarkdownlintV1LogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent, + IReadIssuesSettings settings) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddMarkdownlintV1LogFileContent(logfileContent.ToByteArray(), settings); + } + + #endregion + + #region EsLintJsonLogFile + + /// + /// Adds a path to a ESLint log file in JSON format. + /// + /// Parameter instance. + /// Path to the ESLint log file. + public static void AddEsLintJsonLogFilePath( + this IIssuesParametersInputFiles parameters, + FilePath logfilePath) + { + parameters.NotNull(); + logfilePath.NotNull(); + + parameters.AddEsLintJsonLogFilePath(logfilePath, null); + } + + /// + /// Adds content of a ESLint log file in JSON format. + /// + /// Parameter instance. + /// Content of the ESLint log file. + public static void AddEsLintJsonLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrWhiteSpace(); + + parameters.AddEsLintJsonLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a ESLint log file in JSON format. + /// + /// Parameter instance. + /// Content of the ESLint log file. + public static void AddEsLintJsonLogFileContent( + this IIssuesParametersInputFiles parameters, + byte[] logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddEsLintJsonLogFileContent(logfileContent, null); + } + + /// + /// Adds content of a ESLint log file in JSON format. + /// + /// Parameter instance. + /// Content of the ESLint log file. + /// Settings for reading the log file. Null for default values. + public static void AddEsLintJsonLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent, + IReadIssuesSettings settings) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddEsLintJsonLogFileContent(logfileContent.ToByteArray(), settings); + } + + #endregion + + #region SarifLogFile + + /// + /// Adds a path to a log file in SARIF format. + /// + /// Parameter instance. + /// Path to the SARIF log file. + public static void AddSarifLogFilePath( + this IIssuesParametersInputFiles parameters, + FilePath logfilePath) + { + parameters.NotNull(); + logfilePath.NotNull(); + + parameters.AddSarifLogFilePath(logfilePath, null); + } + + /// + /// Adds content of a log file in SARIF format. + /// + /// Parameter instance. + /// Content of the SARIF log file. + public static void AddSarifLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrWhiteSpace(); + + parameters.AddSarifLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a log file in SARIF format. + /// + /// Parameter instance. + /// Content of the SARIF log file. + public static void AddSarifLogFileContent( + this IIssuesParametersInputFiles parameters, + byte[] logfileContent) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddSarifLogFileContent(logfileContent, null); + } + + /// + /// Adds content of a log file in SARIF format. + /// + /// Parameter instance. + /// Content of the SARIF log file. + /// Settings for reading the log file. Null for default values. + public static void AddSarifLogFileContent( + this IIssuesParametersInputFiles parameters, + string logfileContent, + IReadIssuesSettings settings) + { + parameters.NotNull(); + logfileContent.NotNullOrEmpty(); + + parameters.AddSarifLogFileContent(logfileContent.ToByteArray(), settings); + } + + #endregion + } +} diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IssuesParametersInputFiles.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IssuesParametersInputFiles.cs index 55b5dc3d..e4ce8e57 100644 --- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IssuesParametersInputFiles.cs +++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Context/Parameters/IssuesParametersInputFiles.cs @@ -10,53 +10,93 @@ public class IssuesParametersInputFiles : IIssuesParametersInputFiles /// public IDictionary MsBuildXmlFileLoggerLogFilePaths { get; } = new Dictionary(); + /// + public IDictionary MsBuildXmlFileLoggerLogFileContent { get; } = new Dictionary(); + /// public IDictionary MsBuildBinaryLogFilePaths { get; } = new Dictionary(); + /// + public IDictionary MsBuildBinaryLogFileContent { get; } = new Dictionary(); + /// public IDictionary InspectCodeLogFilePaths { get; } = new Dictionary(); + /// + public IDictionary InspectCodeLogFileContent { get; } = new Dictionary(); + /// public IDictionary MarkdownlintCliLogFilePaths { get; } = new Dictionary(); + /// + public IDictionary MarkdownlintCliLogFileContent { get; } = new Dictionary(); + /// public IDictionary MarkdownlintCliJsonLogFilePaths { get; } = new Dictionary(); + /// + public IDictionary MarkdownlintCliJsonLogFileContent { get; } = new Dictionary(); + /// public IDictionary MarkdownlintV1LogFilePaths { get; } = new Dictionary(); + /// + public IDictionary MarkdownlintV1LogFileContent { get; } = new Dictionary(); + /// public IDictionary EsLintJsonLogFilePaths { get; } = new Dictionary(); + /// + public IDictionary EsLintJsonLogFileContent { get; } = new Dictionary(); + /// public IDictionary SarifLogFilePaths { get; } = new Dictionary(); + /// + public IDictionary SarifLogFileContent { get; } = new Dictionary(); + /// public void AddMsBuildXmlFileLoggerLogFile(FilePath logfilePath) { - logfilePath.NotNull(nameof(logfilePath)); - - this.AddMsBuildXmlFileLoggerLogFile(logfilePath, null); + this.AddMsBuildXmlFileLoggerLogFilePath(logfilePath); } /// public void AddMsBuildXmlFileLoggerLogFile(FilePath logfilePath, IReadIssuesSettings settings) { - logfilePath.NotNull(nameof(logfilePath)); + this.AddMsBuildXmlFileLoggerLogFilePath(logfilePath, settings); + } + + /// + public void AddMsBuildXmlFileLoggerLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) + { + logfilePath.NotNull(); this.MsBuildXmlFileLoggerLogFilePaths.Add(logfilePath, settings); } /// - public void AddMsBuildBinaryLogFile(FilePath logfilePath) + public void AddMsBuildXmlFileLoggerLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) { - logfilePath.NotNull(nameof(logfilePath)); + logfileContent.NotNullOrEmpty(); + + this.MsBuildXmlFileLoggerLogFileContent.Add(logfileContent, settings); + } - this.AddMsBuildBinaryLogFile(logfilePath, null); + /// + public void AddMsBuildBinaryLogFile(FilePath logfilePath) + { + this.AddMsBuildBinaryLogFilePath(logfilePath); } /// public void AddMsBuildBinaryLogFile(FilePath logfilePath, IReadIssuesSettings settings) + { + this.AddMsBuildBinaryLogFilePath(logfilePath, settings); + } + + /// + public void AddMsBuildBinaryLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); @@ -64,15 +104,27 @@ public void AddMsBuildBinaryLogFile(FilePath logfilePath, IReadIssuesSettings se } /// - public void AddInspectCodeLogFile(FilePath logfilePath) + public void AddMsBuildBinaryLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) { - logfilePath.NotNull(nameof(logfilePath)); + logfileContent.NotNullOrEmpty(); - this.AddInspectCodeLogFile(logfilePath, null); + this.MsBuildBinaryLogFileContent.Add(logfileContent, settings); + } + + /// + public void AddInspectCodeLogFile(FilePath logfilePath) + { + this.AddInspectCodeLogFilePath(logfilePath); } /// public void AddInspectCodeLogFile(FilePath logfilePath, IReadIssuesSettings settings) + { + this.AddInspectCodeLogFilePath(logfilePath, settings); + } + + /// + public void AddInspectCodeLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); @@ -80,15 +132,27 @@ public void AddInspectCodeLogFile(FilePath logfilePath, IReadIssuesSettings sett } /// - public void AddMarkdownlintCliLogFile(FilePath logfilePath) + public void AddInspectCodeLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) { - logfilePath.NotNull(nameof(logfilePath)); + logfileContent.NotNullOrEmpty(); + + this.InspectCodeLogFileContent.Add(logfileContent, settings); + } - this.AddMarkdownlintCliLogFile(logfilePath, null); + /// + public void AddMarkdownlintCliLogFile(FilePath logfilePath) + { + this.AddMarkdownlintCliLogFilePath(logfilePath); } /// public void AddMarkdownlintCliLogFile(FilePath logfilePath, IReadIssuesSettings settings) + { + this.AddMarkdownlintCliLogFilePath(logfilePath, settings); + } + + /// + public void AddMarkdownlintCliLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); @@ -96,32 +160,55 @@ public void AddMarkdownlintCliLogFile(FilePath logfilePath, IReadIssuesSettings } /// - public void AddMarkdownlintCliJsonLogFile(FilePath logfilePath) + public void AddMarkdownlintCliLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) { - logfilePath.NotNull(nameof(logfilePath)); + logfileContent.NotNullOrEmpty(); - this.AddMarkdownlintCliJsonLogFile(logfilePath, null); + this.MarkdownlintCliLogFileContent.Add(logfileContent, settings); + } + + /// + public void AddMarkdownlintCliJsonLogFile(FilePath logfilePath) + { + this.AddMarkdownlintCliJsonLogFilePath(logfilePath, null); } /// public void AddMarkdownlintCliJsonLogFile(FilePath logfilePath, IReadIssuesSettings settings) + { + this.AddMarkdownlintCliJsonLogFilePath(logfilePath, settings); + } + + /// + public void AddMarkdownlintCliJsonLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); this.MarkdownlintCliJsonLogFilePaths.Add(logfilePath, settings); } + /// + public void AddMarkdownlintCliJsonLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.MarkdownlintCliJsonLogFileContent.Add(logfileContent, settings); + } /// public void AddMarkdownlintV1LogFile(FilePath logfilePath) { - logfilePath.NotNull(nameof(logfilePath)); - - this.AddMarkdownlintV1LogFile(logfilePath, null); + this.AddMarkdownlintV1LogFilePath(logfilePath); } /// public void AddMarkdownlintV1LogFile(FilePath logfilePath, IReadIssuesSettings settings) + { + this.AddMarkdownlintV1LogFilePath(logfilePath, settings); + } + + /// + public void AddMarkdownlintV1LogFilePath(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); @@ -129,15 +216,27 @@ public void AddMarkdownlintV1LogFile(FilePath logfilePath, IReadIssuesSettings s } /// - public void AddEsLintJsonLogFile(FilePath logfilePath) + public void AddMarkdownlintV1LogFileContent(byte[] logfileContent, IReadIssuesSettings settings) { - logfilePath.NotNull(nameof(logfilePath)); + logfileContent.NotNullOrEmpty(); - this.AddEsLintJsonLogFile(logfilePath, null); + this.MarkdownlintV1LogFileContent.Add(logfileContent, settings); + } + + /// + public void AddEsLintJsonLogFile(FilePath logfilePath) + { + this.AddEsLintJsonLogFilePath(logfilePath); } /// public void AddEsLintJsonLogFile(FilePath logfilePath, IReadIssuesSettings settings) + { + this.AddEsLintJsonLogFilePath(logfilePath, settings); + } + + /// + public void AddEsLintJsonLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); @@ -145,19 +244,39 @@ public void AddEsLintJsonLogFile(FilePath logfilePath, IReadIssuesSettings setti } /// - public void AddSarifLogFile(FilePath logfilePath) + public void AddEsLintJsonLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) { - logfilePath.NotNull(nameof(logfilePath)); + logfileContent.NotNullOrEmpty(); + + this.EsLintJsonLogFileContent.Add(logfileContent, settings); + } - this.AddSarifLogFile(logfilePath, null); + /// + public void AddSarifLogFile(FilePath logfilePath) + { + this.AddSarifLogFilePath(logfilePath); } /// public void AddSarifLogFile(FilePath logfilePath, IReadIssuesSettings settings) + { + this.AddSarifLogFilePath(logfilePath, settings); + } + + /// + public void AddSarifLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); this.SarifLogFilePaths.Add(logfilePath, settings); } + + /// + public void AddSarifLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.SarifLogFileContent.Add(logfileContent, settings); + } } } \ No newline at end of file diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/ReadIssuesTask.cs b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/ReadIssuesTask.cs index 74cf92dd..0d487368 100644 --- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/ReadIssuesTask.cs +++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/ReadIssuesTask.cs @@ -1,6 +1,7 @@ namespace Cake.Frosting.Issues.Recipe { using Cake.Common.Diagnostics; + using Cake.Issues.MsBuild; /// /// Reads issues from the provided log files. @@ -23,6 +24,17 @@ public override void Run(IIssuesContext context) logFile.Value); } + // Read MSBuild log content created by XmlFileLogger. + foreach (var logFileContent in context.Parameters.InputFiles.MsBuildXmlFileLoggerLogFileContent) + { + context.State.AddIssues( + context.MsBuildIssues( + new MsBuildIssuesSettings( + logFileContent.Key, + context.MsBuildXmlFileLoggerFormat())), + logFileContent.Value); + } + // Read MSBuild binary log files. foreach (var logFile in context.Parameters.InputFiles.MsBuildBinaryLogFilePaths) { @@ -33,6 +45,17 @@ public override void Run(IIssuesContext context) logFile.Value); } + // Read MSBuild binary log content. + foreach (var logFileContent in context.Parameters.InputFiles.MsBuildBinaryLogFileContent) + { + context.State.AddIssues( + context.MsBuildIssues( + new MsBuildIssuesSettings( + logFileContent.Key, + context.MsBuildBinaryLogFileFormat())), + logFileContent.Value); + } + // Read InspectCode log files. foreach (var logFile in context.Parameters.InputFiles.InspectCodeLogFilePaths) { @@ -41,6 +64,15 @@ public override void Run(IIssuesContext context) logFile.Value); } + // Read InspectCode log content. + foreach (var logFileContent in context.Parameters.InputFiles.InspectCodeLogFileContent) + { + context.State.AddIssues( + context.InspectCodeIssues( + new InspectCodeIssuesSettings(logFileContent.Key)), + logFileContent.Value); + } + // Read markdownlint-cli log files. foreach (var logFile in context.Parameters.InputFiles.MarkdownlintCliLogFilePaths) { @@ -51,6 +83,17 @@ public override void Run(IIssuesContext context) logFile.Value); } + // Read markdownlint-cli log content. + foreach (var logFileContent in context.Parameters.InputFiles.MarkdownlintCliLogFileContent) + { + context.State.AddIssues( + context.MarkdownlintIssues( + new MarkdownlintIssuesSettings( + logFileContent.Key, + context.MarkdownlintCliLogFileFormat())), + logFileContent.Value); + } + // Read markdownlint-cli log files created with --json. foreach (var logFile in context.Parameters.InputFiles.MarkdownlintCliJsonLogFilePaths) { @@ -61,6 +104,17 @@ public override void Run(IIssuesContext context) logFile.Value); } + // Read markdownlint-cli log content created with --json. + foreach (var logFileContent in context.Parameters.InputFiles.MarkdownlintCliJsonLogFileContent) + { + context.State.AddIssues( + context.MarkdownlintIssues( + new MarkdownlintIssuesSettings( + logFileContent.Key, + context.MarkdownlintCliJsonLogFileFormat())), + logFileContent.Value); + } + // Read markdownlint log files in version 1. foreach (var logFile in context.Parameters.InputFiles.MarkdownlintV1LogFilePaths) { @@ -71,6 +125,17 @@ public override void Run(IIssuesContext context) logFile.Value); } + // Read markdownlint log content in version 1. + foreach (var logFileContent in context.Parameters.InputFiles.MarkdownlintV1LogFileContent) + { + context.State.AddIssues( + context.MarkdownlintIssues( + new MarkdownlintIssuesSettings( + logFileContent.Key, + context.MarkdownlintV1LogFileFormat())), + logFileContent.Value); + } + // Read ESLint log files in JSON format. foreach (var logFile in context.Parameters.InputFiles.EsLintJsonLogFilePaths) { @@ -81,6 +146,17 @@ public override void Run(IIssuesContext context) logFile.Value); } + // Read ESLint log content in JSON format. + foreach (var logFileContent in context.Parameters.InputFiles.EsLintJsonLogFileContent) + { + context.State.AddIssues( + context.EsLintIssues( + new EsLintIssuesSettings( + logFileContent.Key, + context.EsLintJsonFormat())), + logFileContent.Value); + } + // Read SARIF log files. foreach (var logFile in context.Parameters.InputFiles.SarifLogFilePaths) { @@ -95,6 +171,20 @@ public override void Run(IIssuesContext context) logFile.Value); } + // Read SARIF content. + foreach (var logFileContent in context.Parameters.InputFiles.SarifLogFileContent) + { + context.State.AddIssues( + context.SarifIssues( + new SarifIssuesSettings(logFileContent.Key) + { + // Since there might be multiple SARIF log files we need to have a predictable + // issue provider name for reporting pull request states. + UseToolNameAsIssueProviderName = false + }), + logFileContent.Value); + } + context.Information("{0} issues are found.", context.State.Issues.Count()); } } diff --git a/Cake.Issues.Recipe/Content/addins.cake b/Cake.Issues.Recipe/Content/addins.cake index 5cf6539e..c73941a6 100644 --- a/Cake.Issues.Recipe/Content/addins.cake +++ b/Cake.Issues.Recipe/Content/addins.cake @@ -3,18 +3,18 @@ /////////////////////////////////////////////////////////////////////////////// #addin nuget:?package=Cake.Git&version=4.0.0 -#addin nuget:?package=Cake.Issues&version=4.9.0 -#addin nuget:?package=Cake.Issues.MsBuild&version=4.9.0 -#addin nuget:?package=Cake.Issues.InspectCode&version=4.9.0 -#addin nuget:?package=Cake.Issues.Markdownlint&version=4.9.0 -#addin nuget:?package=Cake.Issues.EsLint&version=4.9.0 -#addin nuget:?package=Cake.Issues.Sarif&version=4.9.0 -#addin nuget:?package=Cake.Issues.Reporting&version=4.9.0 -#addin nuget:?package=Cake.Issues.Reporting.Generic&version=4.9.0 -#addin nuget:?package=Cake.Issues.Reporting.Sarif&version=4.9.0 -#addin nuget:?package=Cake.Issues.Reporting.Console&version=4.9.0 -#addin nuget:?package=Cake.Issues.PullRequests&version=4.9.0 -#addin nuget:?package=Cake.Issues.PullRequests.AppVeyor&version=4.9.0 -#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=4.9.0 -#addin nuget:?package=Cake.Issues.PullRequests.GitHubActions&version=4.9.0 +#addin nuget:?package=Cake.Issues&version=4.10.0 +#addin nuget:?package=Cake.Issues.MsBuild&version=4.10.0 +#addin nuget:?package=Cake.Issues.InspectCode&version=4.10.0 +#addin nuget:?package=Cake.Issues.Markdownlint&version=4.10.0 +#addin nuget:?package=Cake.Issues.EsLint&version=4.10.0 +#addin nuget:?package=Cake.Issues.Sarif&version=4.10.0 +#addin nuget:?package=Cake.Issues.Reporting&version=4.10.0 +#addin nuget:?package=Cake.Issues.Reporting.Generic&version=4.10.0 +#addin nuget:?package=Cake.Issues.Reporting.Sarif&version=4.10.0 +#addin nuget:?package=Cake.Issues.Reporting.Console&version=4.10.0 +#addin nuget:?package=Cake.Issues.PullRequests&version=4.10.0 +#addin nuget:?package=Cake.Issues.PullRequests.AppVeyor&version=4.10.0 +#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=4.10.0 +#addin nuget:?package=Cake.Issues.PullRequests.GitHubActions&version=4.10.0 #addin nuget:?package=Cake.AzureDevOps&version=4.0.0 diff --git a/Cake.Issues.Recipe/Content/build.cake b/Cake.Issues.Recipe/Content/build.cake index a6808c37..e1d6703d 100644 --- a/Cake.Issues.Recipe/Content/build.cake +++ b/Cake.Issues.Recipe/Content/build.cake @@ -55,6 +55,17 @@ IssuesBuildTasks.ReadIssuesTask = Task("Read-Issues") logFile.Value); } + // Read MSBuild log content created by XmlFileLogger. + foreach (var logFileContent in IssuesParameters.InputFiles.MsBuildXmlFileLoggerLogFileContent) + { + data.AddIssues( + MsBuildIssues( + new MsBuildIssuesSettings( + logFileContent.Key, + MsBuildXmlFileLoggerFormat)), + logFileContent.Value); + } + // Read MSBuild binary log files. foreach (var logFile in IssuesParameters.InputFiles.MsBuildBinaryLogFilePaths) { @@ -65,6 +76,17 @@ IssuesBuildTasks.ReadIssuesTask = Task("Read-Issues") logFile.Value); } + // Read MSBuild binary log content. + foreach (var logFileContent in IssuesParameters.InputFiles.MsBuildBinaryLogFileContent) + { + data.AddIssues( + MsBuildIssues( + new MsBuildIssuesSettings( + logFileContent.Key, + MsBuildBinaryLogFileFormat)), + logFileContent.Value); + } + // Read InspectCode log files. foreach (var logFile in IssuesParameters.InputFiles.InspectCodeLogFilePaths) { @@ -73,6 +95,15 @@ IssuesBuildTasks.ReadIssuesTask = Task("Read-Issues") logFile.Value); } + // Read InspectCode log content. + foreach (var logFileContent in IssuesParameters.InputFiles.InspectCodeLogFileContent) + { + data.AddIssues( + InspectCodeIssues( + new InspectCodeIssuesSettings(logFileContent.Key)), + logFileContent.Value); + } + // Read markdownlint-cli log files. foreach (var logFile in IssuesParameters.InputFiles.MarkdownlintCliLogFilePaths) { @@ -83,6 +114,17 @@ IssuesBuildTasks.ReadIssuesTask = Task("Read-Issues") logFile.Value); } + // Read markdownlint-cli log content. + foreach (var logFileContent in IssuesParameters.InputFiles.MarkdownlintCliLogFileContent) + { + data.AddIssues( + MarkdownlintIssues( + new MarkdownlintIssuesSettings( + logFileContent.Key, + MarkdownlintCliLogFileFormat)), + logFileContent.Value); + } + // Read markdownlint-cli log files created with --json. foreach (var logFile in IssuesParameters.InputFiles.MarkdownlintCliJsonLogFilePaths) { @@ -93,6 +135,17 @@ IssuesBuildTasks.ReadIssuesTask = Task("Read-Issues") logFile.Value); } + // Read markdownlint-cli log content created with --json. + foreach (var logFileContent in IssuesParameters.InputFiles.MarkdownlintCliJsonLogFileContent) + { + data.AddIssues( + MarkdownlintIssues( + new MarkdownlintIssuesSettings( + logFileContent.Key, + MarkdownlintCliJsonLogFileFormat)), + logFileContent.Value); + } + // Read markdownlint log files in version 1. foreach (var logFile in IssuesParameters.InputFiles.MarkdownlintV1LogFilePaths) { @@ -103,6 +156,17 @@ IssuesBuildTasks.ReadIssuesTask = Task("Read-Issues") logFile.Value); } + // Read markdownlint log content in version 1. + foreach (var logFileContent in IssuesParameters.InputFiles.MarkdownlintV1LogFileContent) + { + data.AddIssues( + MarkdownlintIssues( + new MarkdownlintIssuesSettings( + logFileContent.Key, + MarkdownlintV1LogFileFormat)), + logFileContent.Value); + } + // Read ESLint log files in JSON format. foreach (var logFile in IssuesParameters.InputFiles.EsLintJsonLogFilePaths) { @@ -113,6 +177,17 @@ IssuesBuildTasks.ReadIssuesTask = Task("Read-Issues") logFile.Value); } + // Read ESLint log content in JSON format. + foreach (var logFileContent in IssuesParameters.InputFiles.EsLintJsonLogFileContent) + { + data.AddIssues( + EsLintIssues( + new EsLintIssuesSettings( + logFileContent.Key, + EsLintJsonFormat)), + logFileContent.Value); + } + // Read SARIF log files. foreach (var logFile in IssuesParameters.InputFiles.SarifLogFilePaths) { @@ -127,6 +202,20 @@ IssuesBuildTasks.ReadIssuesTask = Task("Read-Issues") logFile.Value); } + // Read SARIF content. + foreach (var logFileContent in IssuesParameters.InputFiles.SarifLogFileContent) + { + data.AddIssues( + SarifIssues( + new SarifIssuesSettings(logFileContent.Key) + { + // Since there might be multiple SARIF log files we need to have a predictable + // issue provider name for reporting pull request states. + UseToolNameAsIssueProviderName = false + }), + logFileContent.Value); + } + Information("{0} issues are found.", data.Issues.Count()); }); diff --git a/Cake.Issues.Recipe/Content/parameters/IssuesParametersInputFiles.cake b/Cake.Issues.Recipe/Content/parameters/IssuesParametersInputFiles.cake index 2a0cf611..c8efa3af 100644 --- a/Cake.Issues.Recipe/Content/parameters/IssuesParametersInputFiles.cake +++ b/Cake.Issues.Recipe/Content/parameters/IssuesParametersInputFiles.cake @@ -8,49 +8,91 @@ public class IssuesParametersInputFiles /// public IDictionary MsBuildXmlFileLoggerLogFilePaths { get; } = new Dictionary(); + /// + /// Gets list of registered content of MSBuild log files created by XmlFileLogger. + /// + public IDictionary MsBuildXmlFileLoggerLogFileContent { get; } = new Dictionary(); + /// /// Gets list of registered paths to MSBuild binary log files. /// public IDictionary MsBuildBinaryLogFilePaths { get; } = new Dictionary(); + /// + /// Gets list of registered content of MSBuild binary log files. + /// + public IDictionary MsBuildBinaryLogFileContent { get; } = new Dictionary(); + /// /// Gets list of registered paths to InspectCode log files. /// public IDictionary InspectCodeLogFilePaths { get; } = new Dictionary(); + /// + /// Gets list of registered content of InspectCode log files. + /// + public IDictionary InspectCodeLogFileContent { get; } = new Dictionary(); + /// /// Gets list of registered paths to markdownlint-cli log files. /// public IDictionary MarkdownlintCliLogFilePaths { get; } = new Dictionary(); + /// + /// Gets list of registered content of markdownlint-cli log files. + /// + public IDictionary MarkdownlintCliLogFileContent { get; } = new Dictionary(); + /// /// Gets list of registered paths to markdownlint-cli log files created with --json. /// public IDictionary MarkdownlintCliJsonLogFilePaths { get; } = new Dictionary(); + /// + /// Gets list of registered content of markdownlint-cli log files created with --json. + /// + public IDictionary MarkdownlintCliJsonLogFileContent { get; } = new Dictionary(); + /// /// Gets list of registered paths to markdownlint log files in version 1. /// public IDictionary MarkdownlintV1LogFilePaths { get; } = new Dictionary(); + /// + /// Gets list of registered paths to markdownlint log files in version 1. + /// + public IDictionary MarkdownlintV1LogFileContent { get; } = new Dictionary(); + /// /// Gets list of registered paths to ESLint log files in JSON format. /// public IDictionary EsLintJsonLogFilePaths { get; } = new Dictionary(); + /// + /// Gets list of registered content of ESLint log files in JSON format. + /// + public IDictionary EsLintJsonLogFileContent { get; } = new Dictionary(); + /// /// Gets list of registered paths to SARIF log files. /// public IDictionary SarifLogFilePaths { get; } = new Dictionary(); + /// + /// Gets list of registered content of SARIF log files. + /// + public IDictionary SarifLogFileContent { get; } = new Dictionary(); + + #region MsBuildXmlFileLoggerLogFile + /// /// Adds a path to a MSBuild log file created by XmlFileLogger. /// /// Path to the MSBuild log file. + [Obsolete("Use AddMsBuildXmlFileLoggerLogFilePath")] public void AddMsBuildXmlFileLoggerLogFile(FilePath logfilePath) { - logfilePath.NotNull(nameof(logfilePath)); - this.AddMsBuildXmlFileLoggerLogFile(logfilePath, null); + this.AddMsBuildXmlFileLoggerLogFilePath(logfilePath); } /// @@ -58,16 +100,90 @@ public class IssuesParametersInputFiles /// /// Path to the MSBuild log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddMsBuildXmlFileLoggerLogFilePath")] public void AddMsBuildXmlFileLoggerLogFile(FilePath logfilePath, IReadIssuesSettings settings) { - logfilePath.NotNull(nameof(logfilePath)); + this.AddMsBuildXmlFileLoggerLogFilePath(logfilePath, settings); + } + + /// + /// Adds a path to a MSBuild log file created by XmlFileLogger. + /// + /// Path to the MSBuild log file. + public void AddMsBuildXmlFileLoggerLogFilePath(FilePath logfilePath) + { + logfilePath.NotNull(); + + this.AddMsBuildXmlFileLoggerLogFilePath(logfilePath, null); + } + + /// + /// Adds a path to a MSBuild log file created by XmlFileLogger. + /// + /// Path to the MSBuild log file. + /// Settings for reading the log file. Null for default values. + public void AddMsBuildXmlFileLoggerLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) + { + logfilePath.NotNull(); + this.MsBuildXmlFileLoggerLogFilePaths.Add(logfilePath, settings); } + /// + /// Adds content of a MSBuild log file created by XmlFileLogger. + /// + /// Content of the MSBuild log file. + public void AddMsBuildXmlFileLoggerLogFileContent(string logfileContent) + { + logfileContent.NotNullOrWhiteSpace(); + + this.AddMsBuildXmlFileLoggerLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a MSBuild log file created by XmlFileLogger. + /// + /// Content of the MSBuild log file. + public void AddMsBuildXmlFileLoggerLogFileContent(byte[] logfileContent) + { + logfileContent.NotNullOrEmpty(); + + this.AddMsBuildXmlFileLoggerLogFileContent(logfileContent, null); + } + + /// + /// Adds content of a MSBuild log file created by XmlFileLogger. + /// + /// Content of the MSBuild log file. + /// Settings for reading the log file. Null for default values. + public void AddMsBuildXmlFileLoggerLogFileContent(string logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.AddMsBuildXmlFileLoggerLogFileContent(logfileContent.ToByteArray(), settings); + } + + /// + /// Adds content of a MSBuild log file created by XmlFileLogger. + /// + /// Content of the MSBuild log file. + /// Settings for reading the log file. Null for default values. + public void AddMsBuildXmlFileLoggerLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.MsBuildXmlFileLoggerLogFileContent.Add(logfileContent, settings); + } + + #endregion + + #region MsBuildBinaryLogFile + /// /// Adds a path to a MSBuild binary log file. /// /// Path to the MSBuild log file. + [Obsolete("Use AddMsBuildBinaryLogFilePath")] public void AddMsBuildBinaryLogFile(FilePath logfilePath) { logfilePath.NotNull(nameof(logfilePath)); @@ -79,16 +195,91 @@ public class IssuesParametersInputFiles /// /// Path to the MSBuild log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddMsBuildBinaryLogFilePath")] public void AddMsBuildBinaryLogFile(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); this.MsBuildBinaryLogFilePaths.Add(logfilePath, settings); } + /// + /// Adds a path to a MSBuild binary log file. + /// + /// Path to the MSBuild log file. + public void AddMsBuildBinaryLogFilePath(FilePath logfilePath) + { + logfilePath.NotNull(); + + this.AddMsBuildBinaryLogFilePath(logfilePath, null); + } + + /// + /// Adds a path to a MSBuild binary log file. + /// + /// Path to the MSBuild log file. + /// Settings for reading the log file. Null for default values. + public void AddMsBuildBinaryLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) + { + logfilePath.NotNull(nameof(logfilePath)); + + this.MsBuildBinaryLogFilePaths.Add(logfilePath, settings); + } + + /// + /// Adds content of a MSBuild binary log file. + /// + /// Content of the MSBuild log file. + public void AddMsBuildBinaryLogFileContent(string logfileContent) + { + logfileContent.NotNullOrWhiteSpace(); + + this.AddMsBuildBinaryLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a MSBuild binary log file. + /// + /// Content of the MSBuild log file. + public void AddMsBuildBinaryLogFileContent(byte[] logfileContent) + { + logfileContent.NotNullOrEmpty(); + + this.AddMsBuildBinaryLogFileContent(logfileContent, null); + } + + /// + /// Adds content of a MSBuild binary log file. + /// + /// Content of the MSBuild log file. + /// Settings for reading the log file. Null for default values. + public void AddMsBuildBinaryLogFileContent(string logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.AddMsBuildBinaryLogFileContent(logfileContent.ToByteArray(), settings); + } + + /// + /// Adds content of a MSBuild binary log file. + /// + /// Content of the MSBuild log file. + /// Settings for reading the log file. Null for default values. + public void AddMsBuildBinaryLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.MsBuildBinaryLogFileContent.Add(logfileContent, settings); + } + + #endregion + + #region InspectCodeLogFile + /// /// Adds a path to a InspectCode log file. /// /// Path to the InspectCode log file. + [Obsolete("Use AddInspectCodeLogFilePath")] public void AddInspectCodeLogFile(FilePath logfilePath) { logfilePath.NotNull(nameof(logfilePath)); @@ -100,16 +291,91 @@ public class IssuesParametersInputFiles /// /// Path to the InspectCode log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddInspectCodeLogFilePath")] public void AddInspectCodeLogFile(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); this.InspectCodeLogFilePaths.Add(logfilePath, settings); } + /// + /// Adds a path to an InspectCode log file. + /// + /// Path to the InspectCode log file. + public void AddInspectCodeLogFilePath(FilePath logfilePath) + { + logfilePath.NotNull(); + + this.AddInspectCodeLogFilePath(logfilePath, null); + } + + /// + /// Adds a path to a InspectCode log file. + /// + /// Path to the InspectCode log file. + /// Settings for reading the log file. Null for default values. + public void AddInspectCodeLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) + { + logfilePath.NotNull(nameof(logfilePath)); + + this.InspectCodeLogFilePaths.Add(logfilePath, settings); + } + + /// + /// Adds content of an InspectCode log file. + /// + /// Content of the InspectCode log file. + public void AddInspectCodeLogFileContent(string logfileContent) + { + logfileContent.NotNullOrWhiteSpace(); + + this.AddInspectCodeLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of an InspectCode log file. + /// + /// Content of the InspectCode log file. + public void AddInspectCodeLogFileContent(byte[] logfileContent) + { + logfileContent.NotNullOrEmpty(); + + this.AddInspectCodeLogFileContent(logfileContent, null); + } + + /// + /// Adds content of an InspectCode log file. + /// + /// Content of the InspectCode log file. + /// Settings for reading the log file. Null for default values. + public void AddInspectCodeLogFileContent(string logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.AddInspectCodeLogFileContent(logfileContent.ToByteArray(), settings); + } + + /// + /// Adds content of a InspectCode log file. + /// + /// Content of the InspectCode log file. + /// Settings for reading the log file. Null for default values. + public void AddInspectCodeLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.InspectCodeLogFileContent.Add(logfileContent, settings); + } + + #endregion + + #region MarkdownlintCliLogFile + /// /// Adds a path to a markdownlint-cli log file. /// /// Path to the markdownlint-cli log file. + [Obsolete("Use AddMarkdownlintCliLogFilePath")] public void AddMarkdownlintCliLogFile(FilePath logfilePath) { logfilePath.NotNull(nameof(logfilePath)); @@ -121,16 +387,92 @@ public class IssuesParametersInputFiles /// /// Path to the markdownlint-cli log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddMarkdownlintCliLogFilePath")] public void AddMarkdownlintCliLogFile(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); this.MarkdownlintCliLogFilePaths.Add(logfilePath, settings); } + /// + /// Adds a path to a markdownlint-cli log file. + /// + /// Path to the markdownlint-cli log file. + public void AddMarkdownlintCliLogFilePath(FilePath logfilePath) + { + logfilePath.NotNull(); + + this.AddMarkdownlintCliLogFilePath(logfilePath, null); + } + + /// + /// Adds a path to a markdownlint-cli log file. + /// + /// Path to the markdownlint-cli log file. + /// Settings for reading the log file. Null for default values. + public void AddMarkdownlintCliLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) + { + logfilePath.NotNull(nameof(logfilePath)); + + this.MarkdownlintCliLogFilePaths.Add(logfilePath, settings); + } + + /// + /// Adds content of a markdownlint-cli log file. + /// + /// Content of the markdownlint-cli log file. + public void AddMarkdownlintCliLogFileContent(string logfileContent) + { + logfileContent.NotNullOrWhiteSpace(); + + this.AddMarkdownlintCliLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a markdownlint-cli log file. + /// + /// Parameter instance. + /// Content of the markdownlint-cli log file. + public void AddMarkdownlintCliLogFileContent(byte[] logfileContent) + { + logfileContent.NotNullOrEmpty(); + + this.AddMarkdownlintCliLogFileContent(logfileContent, null); + } + + /// + /// Adds content of a markdownlint-cli log file. + /// + /// Content of the markdownlint-cli log file. + /// Settings for reading the log file. Null for default values. + public void AddMarkdownlintCliLogFileContent(string logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.AddMarkdownlintCliLogFileContent(logfileContent.ToByteArray(), settings); + } + + /// + /// Adds content of a markdownlint-cli log file. + /// + /// Content of the markdownlint-cli log file. + /// Settings for reading the log file. Null for default values. + public void AddMarkdownlintCliLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.MarkdownlintCliLogFileContent.Add(logfileContent, settings); + } + + #endregion + + #region MarkdownlintCliJsonLogFile + /// /// Adds a path to a markdownlint-cli log file created with --json. /// /// Path to the markdownlint-cli log file. + [Obsolete("Use AddMarkdownlintCliJsonLogFilePath")] public void AddMarkdownlintCliJsonLogFile(FilePath logfilePath) { logfilePath.NotNull(nameof(logfilePath)); @@ -142,16 +484,91 @@ public class IssuesParametersInputFiles /// /// Path to the markdownlint-cli log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddMarkdownlintCliJsonLogFilePath")] public void AddMarkdownlintCliJsonLogFile(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); this.MarkdownlintCliJsonLogFilePaths.Add(logfilePath, settings); } + /// + /// Adds a path to a markdownlint-cli log file created with --json. + /// + /// Path to the markdownlint-cli log file. + public void AddMarkdownlintCliJsonLogFilePath(FilePath logfilePath) + { + logfilePath.NotNull(); + + this.AddMarkdownlintCliJsonLogFilePath(logfilePath, null); + } + + /// + /// Adds a path to a markdownlint-cli log file created with --json. + /// + /// Path to the markdownlint-cli log file. + /// Settings for reading the log file. Null for default values. + public void AddMarkdownlintCliJsonLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) + { + logfilePath.NotNull(nameof(logfilePath)); + + this.MarkdownlintCliJsonLogFilePaths.Add(logfilePath, settings); + } + + /// + /// Adds content of a markdownlint-cli log file created with --json. + /// + /// Content of the markdownlint-cli log file. + public void AddMarkdownlintCliJsonLogFileContent(string logfileContent) + { + logfileContent.NotNullOrWhiteSpace(); + + this.AddMarkdownlintCliJsonLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a markdownlint-cli log file created with --json. + /// + /// Content of the markdownlint-cli log file. + public void AddMarkdownlintCliJsonLogFileContent(byte[] logfileContent) + { + logfileContent.NotNullOrEmpty(); + + this.AddMarkdownlintCliJsonLogFileContent(logfileContent, null); + } + + /// + /// Adds content of a markdownlint-cli log file created with --json. + /// + /// Content of the markdownlint-cli log file. + /// Settings for reading the log file. Null for default values. + public void AddMarkdownlintCliJsonLogFileContent(string logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.AddMarkdownlintCliJsonLogFileContent(logfileContent.ToByteArray(), settings); + } + + /// + /// Adds content of a markdownlint-cli log file created with --json. + /// + /// Content of the markdownlint-cli log file. + /// Settings for reading the log file. Null for default values. + public void AddMarkdownlintCliJsonLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.MarkdownlintCliJsonLogFileContent.Add(logfileContent, settings); + } + + #endregion + + #region MarkdownlintV1LogFile + /// /// Adds a path to a markdownlint log file in version 1. /// /// Path to the markdownlint log file. + [Obsolete("Use AddMarkdownlintV1LogFilePath")] public void AddMarkdownlintV1LogFile(FilePath logfilePath) { logfilePath.NotNull(nameof(logfilePath)); @@ -163,16 +580,91 @@ public class IssuesParametersInputFiles /// /// Path to the markdownlint log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddMarkdownlintV1LogFilePath")] public void AddMarkdownlintV1LogFile(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); this.MarkdownlintV1LogFilePaths.Add(logfilePath, settings); } + /// + /// Adds a path to a markdownlint log file in version 1. + /// + /// Path to the markdownlint log file. + public void AddMarkdownlintV1LogFilePath(FilePath logfilePath) + { + logfilePath.NotNull(); + + this.AddMarkdownlintV1LogFilePath(logfilePath, null); + } + + /// + /// Adds a path to a markdownlint log file in version 1. + /// + /// Path to the markdownlint log file. + /// Settings for reading the log file. Null for default values. + public void AddMarkdownlintV1LogFilePath(FilePath logfilePath, IReadIssuesSettings settings) + { + logfilePath.NotNull(nameof(logfilePath)); + + this.MarkdownlintV1LogFilePaths.Add(logfilePath, settings); + } + + /// + /// Adds content of a markdownlint log file in version 1. + /// + /// Content of the markdownlint log file. + public void AddMarkdownlintV1LogFileContent(string logfileContent) + { + logfileContent.NotNullOrWhiteSpace(); + + this.AddMarkdownlintV1LogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a markdownlint log file in version 1. + /// + /// Content of the markdownlint log file. + public void AddMarkdownlintV1LogFileContent(byte[] logfileContent) + { + logfileContent.NotNullOrEmpty(); + + this.AddMarkdownlintV1LogFileContent(logfileContent, null); + } + + /// + /// Adds content of a markdownlint log file in version 1. + /// + /// Content of the markdownlint log file. + /// Settings for reading the log file. Null for default values. + public void AddMarkdownlintV1LogFileContent(string logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.AddMarkdownlintV1LogFileContent(logfileContent.ToByteArray(), settings); + } + + /// + /// Adds content of a markdownlint log file in version 1. + /// + /// Content of the markdownlint log file. + /// Settings for reading the log file. Null for default values. + public void AddMarkdownlintV1LogFileContent(byte[] logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.MarkdownlintV1LogFileContent.Add(logfileContent, settings); + } + + #endregion + + #region EsLintJsonLogFile + /// /// Adds a path to a ESLint log file in JSON format. /// /// Path to the ESLint log file. + [Obsolete("Use EsLintJsonLogFilePath")] public void AddEsLintJsonLogFile(FilePath logfilePath) { logfilePath.NotNull(nameof(logfilePath)); @@ -184,16 +676,91 @@ public class IssuesParametersInputFiles /// /// Path to the ESLint log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use EsLintJsonLogFilePath")] public void AddEsLintJsonLogFile(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); this.EsLintJsonLogFilePaths.Add(logfilePath, settings); } + /// + /// Adds a path to a ESLint log file in JSON format. + /// + /// Path to the ESLint log file. + public void AddEsLintJsonLogFilePath(FilePath logfilePath) + { + logfilePath.NotNull(); + + this.AddEsLintJsonLogFilePath(logfilePath, null); + } + + /// + /// Adds a path to a ESLint log file in JSON format. + /// + /// Path to the ESLint log file. + /// Settings for reading the log file. Null for default values. + public void AddEsLintJsonLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) + { + logfilePath.NotNull(nameof(logfilePath)); + + this.EsLintJsonLogFilePaths.Add(logfilePath, settings); + } + + /// + /// Adds content of a ESLint log file in JSON format. + /// + /// Content of the ESLint log file. + public void AddEsLintJsonLogFileContent(string logfileContent) + { + logfileContent.NotNullOrWhiteSpace(); + + this.AddEsLintJsonLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a ESLint log file in JSON format. + /// + /// Content of the ESLint log file. + public void AddEsLintJsonLogFileContent(byte[] logfileContent) + { + logfileContent.NotNullOrEmpty(); + + this.AddEsLintJsonLogFileContent(logfileContent, null); + } + + /// + /// Adds content of a ESLint log file in JSON format. + /// + /// Content of the ESLint log file. + /// Settings for reading the log file. Null for default values. + public void AddEsLintJsonLogFileContent(string logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.AddEsLintJsonLogFileContent(logfileContent.ToByteArray(), settings); + } + + /// + /// Adds content of a ESLint log file in JSON format. + /// + /// Content of the ESLint log file. + /// Settings for reading the log file. Null for default values. + public void AddEsLintJsonLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.EsLintJsonLogFileContent.Add(logfileContent, settings); + } + + #endregion + + #region SarifLogFile + /// /// Adds a path to a log file in SARIF format. /// /// Path to the SARIF log file. + [Obsolete("Use AddSarifLogFilePath")] public void AddSarifLogFile(FilePath logfilePath) { logfilePath.NotNull(nameof(logfilePath)); @@ -204,9 +771,83 @@ public class IssuesParametersInputFiles /// /// Path to the SARIF log file. /// Settings for reading the log file. Null for default values. + [Obsolete("Use AddSarifLogFilePath")] public void AddSarifLogFile(FilePath logfilePath, IReadIssuesSettings settings) { logfilePath.NotNull(nameof(logfilePath)); this.SarifLogFilePaths.Add(logfilePath, settings); } + + /// + /// Adds a path to a log file in SARIF format. + /// + /// Path to the SARIF log file. + public void AddSarifLogFilePath(FilePath logfilePath) + { + logfilePath.NotNull(); + + this.AddSarifLogFilePath(logfilePath, null); + } + + /// + /// Adds a path to a log file in SARIF format. + /// + /// Path to the SARIF log file. + /// Settings for reading the log file. Null for default values. + public void AddSarifLogFilePath(FilePath logfilePath, IReadIssuesSettings settings) + { + logfilePath.NotNull(nameof(logfilePath)); + + this.SarifLogFilePaths.Add(logfilePath, settings); + } + + /// + /// Adds content of a log file in SARIF format. + /// + /// Content of the SARIF log file. + public void AddSarifLogFileContent(string logfileContent) + { + logfileContent.NotNullOrWhiteSpace(); + + this.AddSarifLogFileContent(logfileContent.ToByteArray(), null); + } + + /// + /// Adds content of a log file in SARIF format. + /// + /// Content of the SARIF log file. + public void AddSarifLogFileContent(byte[] logfileContent) + { + logfileContent.NotNullOrEmpty(); + + this.AddSarifLogFileContent(logfileContent, null); + } + + /// + /// Adds content of a log file in SARIF format. + /// + /// Content of the SARIF log file. + /// Settings for reading the log file. Null for default values. + public void AddSarifLogFileContent( + string logfileContent, + IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.AddSarifLogFileContent(logfileContent.ToByteArray(), settings); + } + + /// + /// Adds content of a log file in SARIF format. + /// + /// Content of the SARIF log file. + /// Settings for reading the log file. Null for default values. + public void AddSarifLogFileContent(byte[] logfileContent, IReadIssuesSettings settings) + { + logfileContent.NotNullOrEmpty(); + + this.SarifLogFileContent.Add(logfileContent, settings); + } + + #endregion } \ No newline at end of file diff --git a/docs/configuration.md b/docs/configuration.md index 6d052dac..e3df226a 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -32,16 +32,24 @@ By default [Cake.Git addin] will be used. # Input files -| Cake.Issues.Recipe Methods | Cake.Frosting.Issues.Recipe Methods | Description | -|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------| -| `IssuesParameters.InputFiles.`
    `AddMsBuildXmlFileLoggerLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddMsBuildXmlFileLoggerLogFile()` | Adds a path to a MSBuild log file created by XmlFileLogger. | -| `IssuesParameters.InputFiles.`
    `AddMsBuildBinaryLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddMsBuildBinaryLogFile()` | Adds a path to a MSBuild binary log file. | -| `IssuesParameters.InputFiles.`
    `AddInspectCodeLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddInspectCodeLogFile()` | Adds a path to a JetBrains InspectCode log file. | -| `IssuesParameters.InputFiles.`
    `AddMarkdownlintCliLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintCliLogFile()` | Adds a path to a markdownlint-cli log file. | -| `IssuesParameters.InputFiles.`
    `AddMarkdownlintCliJsonLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintCliJsonLogFile()` | Adds a path to a markdownlint-cli log file writting with `--json`. | -| `IssuesParameters.InputFiles.`
    `AddMarkdownlintV1LogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintV1LogFile()` | Adds a path to a markdownlint log file in version 1. | -| `IssuesParameters.InputFiles.`
    `AddEsLintJsonLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddEsLintJsonLogFile()` | Adds a path to a ESLint log file generated by the [ESLint json formatter]. | -| `IssuesParameters.InputFiles.`
    `AddSarifLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddSarifLogFile()` | Adds a path to a SARIF log file. | +| Cake.Issues.Recipe Methods | Cake.Frosting.Issues.Recipe Methods | Description | +|------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------| +| `IssuesParameters.InputFiles.`
    `AddMsBuildXmlFileLoggerLogFilePath()` | `IssuesContext.Parameters.InputFiles.`
    `AddMsBuildXmlFileLoggerLogFilePath()` | Adds a path to a MSBuild log file created by XmlFileLogger. | +| `IssuesParameters.InputFiles.`
    `AddMsBuildXmlFileLoggerLogFileContent()` | `IssuesContext.Parameters.InputFiles.`
    `AddMsBuildXmlFileLoggerLogFileContent()` | Adds content of a MSBuild log file created by XmlFileLogger. | +| `IssuesParameters.InputFiles.`
    `AddMsBuildBinaryLogFilePath()` | `IssuesContext.Parameters.InputFiles.`
    `AddMsBuildBinaryLogFilePath()` | Adds a path to a MSBuild binary log file. | +| `IssuesParameters.InputFiles.`
    `AddMsBuildBinaryLogFileContent()` | `IssuesContext.Parameters.InputFiles.`
    `AddMsBuildBinaryLogFileContent()` | Adds content of a MSBuild binary log file. | +| `IssuesParameters.InputFiles.`
    `AddInspectCodeLogFilePath()` | `IssuesContext.Parameters.InputFiles.`
    `AddInspectCodeLogFilePath()` | Adds a path to a JetBrains InspectCode log file. | +| `IssuesParameters.InputFiles.`
    `AddInspectCodeLogFileContent()` | `IssuesContext.Parameters.InputFiles.`
    `AddInspectCodeLogFileContent()` | Adds content of a JetBrains InspectCode log file. | +| `IssuesParameters.InputFiles.`
    `AddMarkdownlintCliLogFilePath()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintCliLogFilePath()` | Adds a path to a markdownlint-cli log file. | +| `IssuesParameters.InputFiles.`
    `AddMarkdownlintCliLogFileContent()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintCliLogFileContent()` | Adds content of a markdownlint-cli log file. | +| `IssuesParameters.InputFiles.`
    `AddMarkdownlintCliJsonLogFilePath()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintCliJsonLogFilePath()` | Adds a path to a markdownlint-cli log file writting with `--json`. | +| `IssuesParameters.InputFiles.`
    `AddMarkdownlintCliJsonLogFileContent()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintCliJsonLogFileContent()` | Adds content of a markdownlint-cli log file writting with `--json`. | +| `IssuesParameters.InputFiles.`
    `AddMarkdownlintV1LogFilePath()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintV1LogFilePath()` | Adds a path to a markdownlint log file in version 1. | +| `IssuesParameters.InputFiles.`
    `AddMarkdownlintV1LogFileContent()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintV1LogFileContent()` | Adds content of a markdownlint log file in version 1. | +| `IssuesParameters.InputFiles.`
    `AddEsLintJsonLogFilePath()` | `IssuesContext.Parameters.InputFiles.`
    `AddEsLintJsonLogFilePath()` | Adds a path to a ESLint log file generated by the [ESLint json formatter]. | +| `IssuesParameters.InputFiles.`
    `AddEsLintJsonLogFileContent()` | `IssuesContext.Parameters.InputFiles.`
    `AddEsLintJsonLogFileContent()` | Adds content of a ESLint log file generated by the [ESLint json formatter]. | +| `IssuesParameters.InputFiles.`
    `AddSarifLogFilePath()` | `IssuesContext.Parameters.InputFiles.`
    `AddSarifLogFilePath()` | Adds a path to a SARIF log file. | +| `IssuesParameters.InputFiles.`
    `AddSarifLogFileContent()` | `IssuesContext.Parameters.InputFiles.`
    `AddSarifLogFileContent()` | Adds content of a SARIF log file. | [ESLint json formatter]: https://eslint.org/docs/user-guide/formatters/#json diff --git a/docs/overview.md b/docs/overview.md index ad7f88cd..e8074a01 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -25,19 +25,19 @@ Cake.Issues recipes will add the following addins to your build: | Addin Cake.Issues.Recipe | Addin.Frosting.Issues.Recipe | Remarks | |---------------------------------------------------------|---------------------------------------------------------|-| | [Cake.Git] 4.0.0 | [Cake.Frosting.Git] 4.0.0 | Only used if `RepositoryInfoProvider` type is set to `RepositoryInfoProviderType.CakeGit`. See [Git repository information configuration] for details. | -| [Cake.Issues] 4.9.0 | [Cake.Issues] 4.9.0 | | -| [Cake.Issues.MsBuild] 4.9.0 | [Cake.Frosting.Issues.MsBuild] 4.9.0 | | -| [Cake.Issues.InspectCode] 4.9.0 | [Cake.Frosting.Issues.InspectCode] 4.9.0 | | -| [Cake.Issues.Markdownlint] 4.9.0 | [Cake.Frosting.Issues.Markdownlint] 4.9.0 | | -| [Cake.Issues.EsLint] 4.9.0 | [Cake.Frosting.Issues.EsLint] 4.9.0 | | -| [Cake.Issues.Sarif] 4.9.0 | [Cake.Frosting.Issues.Sarif] 4.9.0 | | -| [Cake.Issues.Reporting] 4.9.0 | [Cake.Frosting.Issues.Reporting] 4.9.0 | | -| [Cake.Issues.Reporting.Generic] 4.9.0 | [Cake.Frosting.Issues.Reporting.Generic] 4.9.0 | | -| [Cake.Issues.Reporting.Sarif] 4.9.0 | [Cake.Frosting.Issues.Reporting.Sarif] 4.9.0 | | -| [Cake.Issues.PullRequests] 4.9.0 | [Cake.Frosting.Issues.PullRequests] 4.9.0 | | -| [Cake.Issues.PullRequests.AppVeyor] 4.9.0 | [Cake.Frosting.Issues.PullRequests.AppVeyor] 4.9.0 | | -| [Cake.Issues.PullRequests.AzureDevOps] 4.9.0 | [Cake.Frosting.Issues.PullRequests.AzureDevOps] 4.9.0 | | -| [Cake.Issues.PullRequests.GitHubActions] 4.9.0 | [Cake.Frosting.Issues.PullRequests.GitHubActions] 4.9.0 | | +| [Cake.Issues] 4.10.0 | [Cake.Issues] 4.10.0 | | +| [Cake.Issues.MsBuild] 4.10.0 | [Cake.Frosting.Issues.MsBuild] 4.10.0 | | +| [Cake.Issues.InspectCode] 4.10.0 | [Cake.Frosting.Issues.InspectCode] 4.10.0 | | +| [Cake.Issues.Markdownlint] 4.10.0 | [Cake.Frosting.Issues.Markdownlint] 4.10.0 | | +| [Cake.Issues.EsLint] 4.10.0 | [Cake.Frosting.Issues.EsLint] 4.10.0 | | +| [Cake.Issues.Sarif] 4.10.0 | [Cake.Frosting.Issues.Sarif] 4.10.0 | | +| [Cake.Issues.Reporting] 4.10.0 | [Cake.Frosting.Issues.Reporting] 4.10.0 | | +| [Cake.Issues.Reporting.Generic] 4.10.0 | [Cake.Frosting.Issues.Reporting.Generic] 4.10.0 | | +| [Cake.Issues.Reporting.Sarif] 4.10.0 | [Cake.Frosting.Issues.Reporting.Sarif] 4.10.0 | | +| [Cake.Issues.PullRequests] 4.10.0 | [Cake.Frosting.Issues.PullRequests] 4.10.0 | | +| [Cake.Issues.PullRequests.AppVeyor] 4.10.0 | [Cake.Frosting.Issues.PullRequests.AppVeyor] 4.10.0 | | +| [Cake.Issues.PullRequests.AzureDevOps] 4.10.0 | [Cake.Frosting.Issues.PullRequests.AzureDevOps] 4.10.0 | | +| [Cake.Issues.PullRequests.GitHubActions] 4.10.0 | [Cake.Frosting.Issues.PullRequests.GitHubActions] 4.10.0 | | | [Cake.AzureDevOps] 4.0.0 | [Cake.AzureDevOps] 4.0.0 | | [Cake.Issues.Recipe]: https://www.nuget.org/packages/Cake.Issues.Recipe diff --git a/docs/supported-tools.md b/docs/supported-tools.md index d54fb44b..e6280580 100644 --- a/docs/supported-tools.md +++ b/docs/supported-tools.md @@ -10,16 +10,16 @@ Cake.Issues recipes support reading issues from different tools and integrates w Cake.Issues recipes support reading issues from output of the following tools: -| Tool | Format | Cake.Issues.Recipe Methods | Cake.Frosting.Issues.Recipe Method | -|-----------------------------------|----------------------------------------|-----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------| -| MsBuild | [MSBuild Extension Pack XmlFileLogger] | `IssuesParameters.InputFiles.`
    `AddMsBuildXmlFileLoggerLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddMsBuildXmlFileLoggerLogFile()` | -| MsBuild | Binary Log File | `IssuesParameters.InputFiles.`
    `AddMsBuildBinaryLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddMsBuildBinaryLogFile()` | -| JetBrains InspectCode (ReSharper) | | `IssuesParameters.InputFiles.`
    `AddInspectCodeLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddInspectCodeLogFile()` | -| markdownlint | [markdownlint-cli] | `IssuesParameters.InputFiles.`
    `AddMarkdownlintCliLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintCliLogFile()` | -| markdownlint | [markdownlint-cli] with `--json` | `IssuesParameters.InputFiles.`
    `AddMarkdownlintCliJsonLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintCliJsonLogFile()` | -| markdownlint | [markdownlint] version 1 | `IssuesParameters.InputFiles.`
    `AddMarkdownlintV1LogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintV1LogFile()` | -| [ESLint] | [json formatter] | `IssuesParameters.InputFiles.`
    `AddEsLintJsonLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddEsLintJsonLogFile()` | -| Any SARIF compatible tool | [SARIF] | `IssuesParameters.InputFiles.`
    `AddSarifLogFile()` | `IssuesContext.Parameters.InputFiles.`
    `AddSarifLogFile()` | +| Tool | Format | Cake.Issues.Recipe Methods | Cake.Frosting.Issues.Recipe Method | +|-----------------------------------|----------------------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------| +| MsBuild | [MSBuild Extension Pack XmlFileLogger] | `IssuesParameters.InputFiles.`
    `AddMsBuildXmlFileLoggerLogFile*()` | `IssuesContext.Parameters.InputFiles.`
    `AddMsBuildXmlFileLoggerLogFile*()` | +| MsBuild | Binary Log File | `IssuesParameters.InputFiles.`
    `AddMsBuildBinaryLogFile*()` | `IssuesContext.Parameters.InputFiles.`
    `AddMsBuildBinaryLogFile*()` | +| JetBrains InspectCode (ReSharper) | | `IssuesParameters.InputFiles.`
    `AddInspectCodeLogFile*()` | `IssuesContext.Parameters.InputFiles.`
    `AddInspectCodeLogFile*()` | +| markdownlint | [markdownlint-cli] | `IssuesParameters.InputFiles.`
    `AddMarkdownlintCliLogFile*()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintCliLogFile*()` | +| markdownlint | [markdownlint-cli] with `--json` | `IssuesParameters.InputFiles.`
    `AddMarkdownlintCliJsonLogFile*()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintCliJsonLogFile*()` | +| markdownlint | [markdownlint] version 1 | `IssuesParameters.InputFiles.`
    `AddMarkdownlintV1LogFile*()` | `IssuesContext.Parameters.InputFiles.`
    `AddMarkdownlintV1LogFile*()` | +| [ESLint] | [json formatter] | `IssuesParameters.InputFiles.`
    `AddEsLintJsonLogFile*()` | `IssuesContext.Parameters.InputFiles.`
    `AddEsLintJsonLogFile*()` | +| Any SARIF compatible tool | [SARIF] | `IssuesParameters.InputFiles.`
    `AddSarifLogFile*()` | `IssuesContext.Parameters.InputFiles.`
    `AddSarifLogFile*()` | [MSBuild Extension Pack XmlFileLogger]: http://www.msbuildextensionpack.com/help/4.0.5.0/html/242ab4fd-c2e2-f6aa-325b-7588725aed24.htm [markdownlint-cli]: https://github.com/igorshubovych/markdownlint-cli diff --git a/docs/usage/using-cake-frosting-issues-recipe.md b/docs/usage/using-cake-frosting-issues-recipe.md index a5230060..7a371552 100644 --- a/docs/usage/using-cake-frosting-issues-recipe.md +++ b/docs/usage/using-cake-frosting-issues-recipe.md @@ -97,7 +97,7 @@ public class RunInspectCodeTask : FrostingTask }); // Pass path to InspectCode log file to Cake.Frosting.Issues.Recipe - context.Parameters.InputFiles.AddInspectCodeLogFile(context.InspectCodeLogFilePath); + context.Parameters.InputFiles.AddInspectCodeLogFilePath(context.InspectCodeLogFilePath); } } ``` diff --git a/docs/usage/using-cake-issues-recipe.md b/docs/usage/using-cake-issues-recipe.md index ddb14399..71cbc419 100644 --- a/docs/usage/using-cake-issues-recipe.md +++ b/docs/usage/using-cake-issues-recipe.md @@ -34,8 +34,8 @@ Task("Configure-CakeIssuesRecipe") .IsDependentOn("Run-InspectCode") .Does(() => { - IssuesParameters.InputFiles.AddMsBuildXmlFileLoggerLogFile(msBuildLogFilePath); - IssuesParameters.InputFiles.AddInspectCodeLogFile(inspectCodeLogFilePath); + IssuesParameters.InputFiles.AddMsBuildXmlFileLoggerLogFilePath(msBuildLogFilePath); + IssuesParameters.InputFiles.AddInspectCodeLogFilePath(inspectCodeLogFilePath); } ``` diff --git a/nuspec/nuget/Cake.Issues.Recipe.nuspec b/nuspec/nuget/Cake.Issues.Recipe.nuspec index 4b1694b5..c30e5b5f 100644 --- a/nuspec/nuget/Cake.Issues.Recipe.nuspec +++ b/nuspec/nuget/Cake.Issues.Recipe.nuspec @@ -23,7 +23,7 @@ For recipe compatible with Cake Frosting see Cake.Frosting.Issues.Recipe. Copyright © Pascal Berger cake cake-recipe cake-issues - https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/4.9.0 + https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/4.10.0 diff --git a/tests/frosting/net6.0/build/Program.cs b/tests/frosting/net6.0/build/Program.cs index 18a5845e..1d24d38e 100644 --- a/tests/frosting/net6.0/build/Program.cs +++ b/tests/frosting/net6.0/build/Program.cs @@ -106,7 +106,7 @@ public override void Run(BuildContext context) settings); // Pass path to InspectCode log file to Cake.Frosting.Issues.Recipe. - context.Parameters.InputFiles.AddInspectCodeLogFile(inspectCodeLogFilePath); + context.Parameters.InputFiles.AddInspectCodeLogFilePath(inspectCodeLogFilePath); } } diff --git a/tests/frosting/net7.0/build/Program.cs b/tests/frosting/net7.0/build/Program.cs index 18a5845e..1d24d38e 100644 --- a/tests/frosting/net7.0/build/Program.cs +++ b/tests/frosting/net7.0/build/Program.cs @@ -106,7 +106,7 @@ public override void Run(BuildContext context) settings); // Pass path to InspectCode log file to Cake.Frosting.Issues.Recipe. - context.Parameters.InputFiles.AddInspectCodeLogFile(inspectCodeLogFilePath); + context.Parameters.InputFiles.AddInspectCodeLogFilePath(inspectCodeLogFilePath); } } diff --git a/tests/frosting/net8.0/build/Program.cs b/tests/frosting/net8.0/build/Program.cs index 18a5845e..1d24d38e 100644 --- a/tests/frosting/net8.0/build/Program.cs +++ b/tests/frosting/net8.0/build/Program.cs @@ -106,7 +106,7 @@ public override void Run(BuildContext context) settings); // Pass path to InspectCode log file to Cake.Frosting.Issues.Recipe. - context.Parameters.InputFiles.AddInspectCodeLogFile(inspectCodeLogFilePath); + context.Parameters.InputFiles.AddInspectCodeLogFilePath(inspectCodeLogFilePath); } } diff --git a/tests/script-runner/build.cake b/tests/script-runner/build.cake index a05fffc5..bbfcef21 100644 --- a/tests/script-runner/build.cake +++ b/tests/script-runner/build.cake @@ -78,7 +78,7 @@ Task("Build") #endif // Pass path to MsBuild log file to Cake.Issues.Recipe - IssuesParameters.InputFiles.AddMsBuildBinaryLogFile(data.MsBuildLogFilePath); + IssuesParameters.InputFiles.AddMsBuildBinaryLogFilePath(data.MsBuildLogFilePath); }); Task("Run-InspectCode") @@ -95,7 +95,7 @@ Task("Run-InspectCode") settings); // Pass path to InspectCode log file to Cake.Issues.Recipe - IssuesParameters.InputFiles.AddInspectCodeLogFile(data.InspectCodeLogFilePath); + IssuesParameters.InputFiles.AddInspectCodeLogFilePath(data.InspectCodeLogFilePath); }); Task("Lint-Documentation") @@ -109,7 +109,7 @@ Task("Lint-Documentation") RunMarkdownlintNodeJs(settings); // Pass path to markdownlint-cli log file to Cake.Issues.Recipe - IssuesParameters.InputFiles.AddMarkdownlintCliLogFile(data.MarkdownlintCliLogFilePath); + IssuesParameters.InputFiles.AddMarkdownlintCliLogFilePath(data.MarkdownlintCliLogFilePath); }); Task("Lint")