From 1baa9b1f3ec5a133a1ffd04bf14f208f741642b6 Mon Sep 17 00:00:00 2001 From: Rotem Tamir Date: Sun, 15 Dec 2024 11:16:02 +0200 Subject: [PATCH] cmd/atlas: add warning to lint summary --- cmd/atlas/internal/migratelint/run.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cmd/atlas/internal/migratelint/run.go b/cmd/atlas/internal/migratelint/run.go index 896c85f9b3e..aa7b0e88e32 100644 --- a/cmd/atlas/internal/migratelint/run.go +++ b/cmd/atlas/internal/migratelint/run.go @@ -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. @@ -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.