From abe48b022c4b31063154af1e978b7e353f9e0ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Thu, 22 Aug 2024 11:59:27 +0200 Subject: [PATCH] chore: add support for ireturn --- .golangci.yml | 1 + internal/interactive/list.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 519f631236..74d29298da 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -34,6 +34,7 @@ linters: - importas # Enforces consistent import aliases [fast: false, auto-fix: false] - ineffassign # Detects when assignments to existing variables are not used [fast: true, auto-fix: false] - intrange # intrange is a linter to find places where for loops could make use of an integer range. [fast: true, auto-fix: false] + - ireturn # Accept Interfaces, Return Concrete Types [fast: false, auto-fix: false] - loggercheck # (logrlint): Checks key value pairs for common logger libraries (kitlog,klog,logr,zap). [fast: false, auto-fix: false] - makezero # Finds slice declarations with non-zero initial length [fast: false, auto-fix: false] - mirror # reports wrong mirror patterns of bytes/strings usage [fast: false, auto-fix: false] diff --git a/internal/interactive/list.go b/internal/interactive/list.go index 96cd1facab..43090f6888 100644 --- a/internal/interactive/list.go +++ b/internal/interactive/list.go @@ -11,6 +11,9 @@ import ( tea "github.com/charmbracelet/bubbletea" ) +// Verify Interface Compliance in compile time +var _ tea.Model = (*ListPrompt)(nil) + type ListPrompt struct { // Prompt that will be printed when showing the list Prompt string