forked from cake-build/cake
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(cake-buildGH-1746) ScriptAnalyzer will not throw on error.
- ScriptAnalyzer will not throw on error. Instead the result will indicate if analysis succeeded or not. A list of errors is also present in the analyzer result. - Fixes cake-build#1746
- Loading branch information
1 parent
5a60a7c
commit 7bee399
Showing
9 changed files
with
183 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System; | ||
using Cake.Core.IO; | ||
|
||
namespace Cake.Core.Scripting.Analysis | ||
{ | ||
/// <summary> | ||
/// Represents a script analysis error. | ||
/// </summary> | ||
public sealed class ScriptAnalyzerError | ||
{ | ||
/// <summary> | ||
/// Gets the file containing the error. | ||
/// </summary> | ||
public FilePath File { get; } | ||
|
||
/// <summary> | ||
/// Gets the line number for the error. | ||
/// </summary> | ||
public int Line { get; } | ||
|
||
/// <summary> | ||
/// Gets the error message. | ||
/// </summary> | ||
public string Message { get; } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ScriptAnalyzerError"/> class. | ||
/// </summary> | ||
/// <param name="file">The file containing the error.</param> | ||
/// <param name="line">The line number for the error.</param> | ||
/// <param name="message">The error message.</param> | ||
public ScriptAnalyzerError(FilePath file, int line, string message) | ||
{ | ||
if (file == null) | ||
{ | ||
throw new ArgumentNullException(nameof(file)); | ||
} | ||
|
||
File = file; | ||
Line = line; | ||
Message = message; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters