Skip to content

Commit 67a4b84

Browse files
committed
docs(analysis): write ADR (#3990)
1 parent c50bc23 commit 67a4b84

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

dev_docs/adr/2025-21-03-ADR_11_change_module_structure.md

+65
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,77 @@ tags:
88
title: "ADR 11: Decide Module Structure"
99
---
1010

11+
Modules are hard to find because they are hidden in the Tools Module. We need to make them more visible and provide a better structure for them.
12+
At the moment the term "parser" is used as a general term and a specific term at the same time. E.g.: We have this message in our CCSH: "No usable parser was found for the input file path!" - this is misleading because we are not looking for specific parsers, but we are looking for parsers, exporters, tools,...
13+
We propose to change the general term "parser" to "analyser" and keep the term parser only for the specific parsers.
14+
15+
We have 5 different analyser types:
16+
- export
17+
- filter
18+
- import
19+
- parser
20+
- tool
21+
22+
All of those 5 analyser types implements the "Callable"-Interface and the "InteractiveParser"-Interface.
23+
Not all analysers that have a method like: "getAttributeDescriptorMaps" implement the "AttributeGenerator"-Interface - this can lead to confusion and potential errors.
24+
25+
The Tool Module contains more than just tools, it also contains general super types like ccsh, inquirer or interactive parser. We need to separate the tools from the general super types.
1126

1227
# Status
1328

1429
proposed
1530

1631
# Decision
1732

33+
There will be a new Module: "Analysers". This module contains the 5 different analyser type modules. For every of those 5 analyser types, there is an interface.
34+
The "InteractiveParser" will be renamed to "AnalyserInterface". This interface implements the "Callable"-Interface.
35+
The "PipeableParser" will be renamed to "PipeableAnalyserInterface". (If all analysers should be pipable, we can remove this interface and implement the "PipeableInterface" in the "AnalyserInterface").
36+
37+
The Inquirer module will be placed in the new "AnalyserInterface" module (former "InteractiveParser" module), because all analysers that implement the "InteractiveParser"-Interface also need this "Inquirer"-Module.
38+
39+
The "ccsh"-module will be moved one level up to the analysis folder.
40+
All mentions of "parser" in the ccsh are renamed to "analyser".
41+
42+
All ParserDialogs will be renamed to Dialog.
43+
44+
All analysers that have a method like: "getAttributeDescriptorMaps" implement the "AttributeGenerator"-Interface.
45+
46+
The analyser modules will be renamed to:
47+
- export -> exporters
48+
- filter -> filters
49+
- import -> importers
50+
- parser -> parsers
51+
52+
The analyser module contains those modules:
53+
- AnalyserInterface
54+
- PipeableAnalyserInterface
55+
- exporters
56+
- - ExporterInterface
57+
- - CSVExporter
58+
- filters
59+
- - FilterInterface
60+
- - EdgeFilter
61+
- - MergeFilter
62+
- - StructureFilter
63+
- importers
64+
- - ImporterInterface
65+
- - CSVImporter
66+
- - CodeMaatImporter
67+
- - MetricGardenerImporter
68+
- - SonarImporter
69+
- - SourceMonitorImporter
70+
- - TokeiImporter
71+
- parsers
72+
- - ParserInterface
73+
- - GitLogParser
74+
- - RawTextParser
75+
- - SourceCodeParser
76+
- - SVNLogParser
77+
- tools
78+
- - ToolInterface
79+
- - ValidationTool
80+
- - InspectorTool
1881

1982
# Consequences
83+
A lot of renaming and restructuring. However, some output messages to the user will be changed slightly, to reflect the new terminology.
84+
The structure will be clearer for the users and the developers.

0 commit comments

Comments
 (0)