Skip to content

Commit

Permalink
cmd/atlas: add warning to lint summary (#3263)
Browse files Browse the repository at this point in the history
  • Loading branch information
rotemtam authored Dec 15, 2024
1 parent 952022b commit db71c83
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions cmd/atlas/internal/migratelint/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ type (
End time.Time `json:"-"` // End time of the analysis.
FromV, ToV string `json:"-"` // From and to versions.
TotalFiles int `json:"-"` // Total number of files to analyze.

// A warning to be printed to the terminal, such as a license warning.
Warning *struct {
Title string
Text string
} `json:"-"`
}

// FileChange specifies whether the file was added, deleted or changed.
Expand All @@ -412,8 +418,11 @@ type (
Error string `json:"Error,omitempty"` // Error that cause the execution to halt.
Result *FileReport `json:"Result,omitempty"` // Result of the step. For example, a diagnostic.

// Text formatting
NameColor string `json:"-"` // Color of the name field when printed to the terminal.
// A warning to be printed to the terminal, such as a license warning.
Warning struct {
Title string `json:"Title,omitempty"`
Text string `json:"Text,omitempty"`
} `json:"-"`
}

// FileReport contains a summary of the analysis of a single file.
Expand Down

0 comments on commit db71c83

Please sign in to comment.