Commit graph

11 commits

Author SHA1 Message Date
Marty Oehme 31b878c9eb
refactor: Move Annotations into annotation module 2023-09-20 17:22:29 +02:00
Marty Oehme e511ffa48d
feat: Add CSV formatter
Added formatter for csv-compatible syntax. The formatting is quite basic
with no escaping happening should that be necessary. However, for an
initial csv output it suffices for me.
2023-09-20 09:15:00 +02:00
Marty Oehme 5a6d672c76
refactor: Move formatting logic to formatters
Formatters (previously templates) were pure data containers before,
continating the 'template' for how things should be formatted using
mustache. The formatting would be done a) in the exporters and b) in the
annotations.

This spread of formatting has now been consolidated into the Formatter,
which fixes the overall spread of formatting code and now can coherently
format a whole output instead of just individual annotations.

A formatter contains references to all documents and contained
annotations and will format everything at once by default, but the
formatting function can be invoked with reference to a specific
annotated document to only format that.

This commit should put more separation into the concerns of exporter and
formatter and made formatting a concern purely of the formatters and
annotation objects.
2023-09-20 09:14:58 +02:00
Marty Oehme 07d4de9a46
docs: Add docstrings 2023-09-20 09:13:04 +02:00
Marty Oehme 4eb983d9e3
refactor: Move templating to separate file 2023-09-20 09:12:59 +02:00
Marty Oehme 5450776eb2
refactor: Extract templating to model module 2023-09-20 09:12:45 +02:00
Marty Oehme e56f014136
Add formatting style Markdown 2023-08-31 21:40:17 +02:00
Marty Oehme 20873e6ef8
Change annotation color to simple rgb tuple
Some checks failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/static_analysis Pipeline was successful
2023-08-29 22:23:52 +02:00
Marty Oehme 256117d451
Add mustache templating
Added mustache templating engine to be able to provide custom
formatting strings.
2023-08-29 13:49:22 +02:00
Marty Oehme ff84a28c4a
Format code 2023-08-28 12:55:01 +02:00
Marty Oehme a22cc635b2
initial commit 2023-08-28 10:28:06 +02:00