Add wsl linter and fix

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-19 14:51:08 +04:00
parent eedfdcecc8
commit 9156d6a16a
882 changed files with 6068 additions and 574 deletions

View File

@@ -45,6 +45,7 @@ func NewCmdDelete(f *cmdutil.Factory) *cobra.Command {
}
var confirmed bool
err := huh.NewConfirm().
Title(fmt.Sprintf("Delete framework %s?", args[0])).
Value(&confirmed).
@@ -52,6 +53,7 @@ func NewCmdDelete(f *cmdutil.Factory) *cobra.Command {
if err != nil {
return err
}
if !confirmed {
return nil
}

View File

@@ -106,6 +106,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
if err := cmdutil.ValidateEnum("order-by", flagOrderBy, []string{"CREATED_AT"}); err != nil {
return err
}
variables["orderBy"] = map[string]any{
"field": flagOrderBy,
"direction": flagOrderDir,
@@ -127,12 +128,15 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
if err := json.Unmarshal(data, &resp); err != nil {
return nil, err
}
if resp.Node == nil {
return nil, fmt.Errorf("organization %s not found", flagOrg)
}
if resp.Node.Typename != "Organization" {
return nil, fmt.Errorf("expected Organization node, got %s", resp.Node.Typename)
}
return &resp.Node.Frameworks, nil
},
)
@@ -155,6 +159,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
if fw.Description != nil {
desc = *fw.Description
}
rows = append(rows, []string{
fw.ID,
fw.Name,

View File

@@ -81,6 +81,7 @@ func NewCmdUpdate(f *cmdutil.Factory) *cobra.Command {
if cmd.Flags().Changed("name") {
input["name"] = flagName
}
if cmd.Flags().Changed("description") {
if flagDescription == "" {
input["description"] = nil