Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/atlas: add warning to lint summary #3263

Merged
merged 1 commit into from
Dec 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading