generated from atata-framework/atata-repository-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHtmlValidateFormatter.cs
52 lines (40 loc) · 1.59 KB
/
HtmlValidateFormatter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
namespace Atata.Cli.HtmlValidate
{
/// <summary>
/// Represents the formatter.
/// </summary>
public class HtmlValidateFormatter
{
public HtmlValidateFormatter(string name, string filePath = null)
{
Name = name.CheckNotNullOrWhitespace(nameof(name));
FilePath = filePath;
}
/// <summary>
/// Gets the name.
/// </summary>
public string Name { get; }
/// <summary>
/// Gets the output file path.
/// </summary>
public string FilePath { get; }
public static HtmlValidateFormatter Checkstyle(string filePath = null) =>
new HtmlValidateFormatter(Names.Checkstyle, filePath);
public static HtmlValidateFormatter Codeframe(string filePath = null) =>
new HtmlValidateFormatter(Names.Codeframe, filePath);
public static HtmlValidateFormatter Json(string filePath = null) =>
new HtmlValidateFormatter(Names.Json, filePath);
public static HtmlValidateFormatter Stylish(string filePath = null) =>
new HtmlValidateFormatter(Names.Stylish, filePath);
public static HtmlValidateFormatter Text(string filePath = null) =>
new HtmlValidateFormatter(Names.Text, filePath);
public static class Names
{
public const string Checkstyle = "checkstyle";
public const string Codeframe = "codeframe";
public const string Json = "json";
public const string Stylish = "stylish";
public const string Text = "text";
}
}
}