push
appveyor
1748 of 1748 new or added lines in 107 files covered. (100.0%)
14860 of 20193 relevant lines covered (73.59%)
1920.78 hits per line
1 |
// Licensed to the .NET Foundation under one or more agreements. |
|
2 |
// The .NET Foundation licenses this file to you under the MIT license.
|
|
3 |
// See the LICENSE file in the project root for more information.
|
|
4 |
|
|
5 |
using System;
|
|
6 |
using Cake.Core.Scripting.Analysis;
|
|
7 |
|
|
8 |
namespace Cake.Core.Scripting.Processors
|
|
9 |
{ |
|
10 |
internal sealed class BreakDirectiveProcessor : LineProcessor |
|
11 |
{ |
|
12 |
public override bool Process(IScriptAnalyzerContext context, string line, out string replacement) |
|
13 |
{ |
45 all except ✔ |
14 |
if (context == null)
|
45 all except ✔ |
15 |
{ |
× |
16 |
throw new ArgumentNullException(nameof(context)); |
× |
17 |
} |
|
18 |
|
|
19 |
replacement = null; |
45 all except ✔ |
20 |
|
|
21 |
if (!line.Trim().Equals("#break", StringComparison.Ordinal)) |
45 all except ✔ |
22 |
{ |
44 all except ✔ |
23 |
return false; |
44 all except ✔ |
24 |
} |
|
25 |
|
|
26 |
replacement = @"if (System.Diagnostics.Debugger.IsAttached) { System.Diagnostics.Debugger.Break(); }"; |
1 all except ✔ |
27 |
return true; |
1 all except ✔ |
28 |
} |
45 all except ✔ |
29 |
} |
|
30 |
} |