Skip to content

Commit

Permalink
Add report.Content.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Nov 28, 2020
1 parent a9a3b4c commit 523ecbe
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
14 changes: 14 additions & 0 deletions internal/report/content.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package report

// Content is arbitrary content that can be added to various parts of a report.
type Content struct {
// Heading is a heading for the content.
//
// It may be empty. It should be given in lower case without a trailing
// period, exclamation or question mark, similar to how Go error messages
// are formatted.
Heading string

// Body is the content itself.
Body string
}
13 changes: 8 additions & 5 deletions internal/report/finding.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ type Finding struct {
// in preference to "no events were recorded at all".
Caption string

// Polarity indicates how the finding influenced test result, if at all.
Polarity FindingPolarity

// Evidence contains other findings that led to this finding.
Evidence []Finding

// Summary is a brief paragraph describing the finding.
//
// It may be empty. If provided, it should be in sentence case, punctuated
Expand All @@ -29,11 +35,8 @@ type Finding struct {
// in preference to "The expected event was not recorded.".
Summary string

// Polarity indicates how the finding influenced test result, if at all.
Polarity FindingPolarity

// Evidence contains other findings that led to this finding.
Evidence []Finding
// Content is arbitrary additional content.
Content []Content

// Suggestions is a collection of recommended actions.
//
Expand Down
3 changes: 3 additions & 0 deletions internal/report/stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ type Stage struct {
// Transcript is a history of what occurred during this stage.
Transcript Transcript

// Content is arbitrary additional content.
Content []Content

// Findings is the set of discoveries made by analysing the transcript.
Findings []Finding
}

0 comments on commit 523ecbe

Please sign in to comment.