1 module dls.tools.configuration;
2 
3 class Configuration
4 {
5     SymbolConfiguration symbol;
6     AnalysisConfiguration analysis;
7     FormatConfiguration format;
8 
9     this()
10     {
11         symbol = new SymbolConfiguration();
12         analysis = new AnalysisConfiguration();
13         format = new FormatConfiguration();
14     }
15 
16     static class SymbolConfiguration
17     {
18         string[] importPaths;
19     }
20 
21     static class AnalysisConfiguration
22     {
23         string configFile = "dscanner.ini";
24     }
25 
26     static class FormatConfiguration
27     {
28         static enum BraceStyle
29         {
30             allman = "allman",
31             otbs = "otbs",
32             stroustrup = "stroustrup"
33         }
34 
35         static enum EndOfLine
36         {
37             lf = "lf",
38             cr = "cr",
39             crlf = "crlf"
40         }
41 
42         static enum TemplateConstraintStyle
43         {
44             conditionalNewlineIndent = "conditionalNewlineIndent",
45             conditionalNewline = "conditionalNewline",
46             alwaysNewline = "alwaysNewline",
47             alwaysNewlineIndent = "alwaysNewlineIndent"
48         }
49 
50         EndOfLine endOfLine = EndOfLine.lf;
51         int maxLineLength = 120;
52         bool dfmtAlignSwitchStatements = true;
53         BraceStyle dfmtBraceStyle = BraceStyle.allman;
54         bool dfmtOutdentAttributes = true;
55         int dfmtSoftMaxLineLength = 80;
56         bool dfmtSpaceAfterCast = true;
57         bool dfmtSpaceAfterKeywords = true;
58         bool dfmtSpaceBeforeFunctionParameters = false;
59         bool dfmtSplitOperatorAtLineEnd = false;
60         bool dfmtSelectiveImportSpace = true;
61         bool dfmtCompactLabeledStatements = true;
62         TemplateConstraintStyle dfmtTemplateConstraintStyle = TemplateConstraintStyle
63             .conditionalNewlineIndent;
64         bool dfmtSingleTemplateConstraintIndent = false;
65     }
66 }