You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/linters/lint.go
+67-57Lines changed: 67 additions & 57 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ import (
4
4
"encoding/json"
5
5
"errors"
6
6
"fmt"
7
+
"github.com/samber/lo"
7
8
"os"
8
9
"strings"
9
10
"sync"
@@ -16,25 +17,25 @@ import (
16
17
)
17
18
18
19
typeCliArgsstruct {
19
-
FormatTypestring
20
-
ProtoImportPaths []string
21
-
EnabledRules[]string
22
-
DisabledRules[]string
23
-
ListRulesFlagbool
24
-
DebugFlagbool
25
-
IgnoreCommentDisablesFlagbool
20
+
//FormatType string
21
+
//ProtoImportPaths []string
22
+
EnabledRules []string
23
+
DisabledRules []string
24
+
ListRulesFlagbool
25
+
DebugFlagbool
26
+
//IgnoreCommentDisablesFlag bool
26
27
}
27
28
28
29
funcNewCli() (*CliArgs, typex.Flags) {
29
30
varcliArgsCliArgs
30
31
31
32
return&cliArgs, typex.Flags{
32
-
&cli.BoolFlag{
33
-
Name: "ignore-comment-disables",
34
-
Usage: "If set to true, disable comments will be ignored.\nThis is helpful when strict enforcement of AIPs are necessary and\nproto definitions should not be able to disable checks.",
35
-
Value: false,
36
-
Destination: &cliArgs.IgnoreCommentDisablesFlag,
37
-
},
33
+
//&cli.BoolFlag{
34
+
// Name: "ignore-comment-disables",
35
+
// Usage: "If set to true, disable comments will be ignored.\nThis is helpful when strict enforcement of AIPs are necessary and\nproto definitions should not be able to disable checks.",
Usage: "The format of the linting results.\nSupported formats include \"yaml\", \"json\",\"github\" and \"summary\" table.\nYAML is the default.",
56
-
Aliases: []string{"f"},
57
-
Value: "",
58
-
Destination: &cliArgs.FormatType,
59
-
},
60
-
61
-
&cli.StringSliceFlag{
62
-
Name: "proto-path",
63
-
Usage: "The folder for searching proto imports.\\nMay be specified multiple times; directories will be searched in order.\\nThe current working directory is always used.",
64
-
Aliases: []string{"I"},
65
-
Value: nil,
66
-
Destination: &cliArgs.ProtoImportPaths,
67
-
},
68
-
69
-
&cli.StringSliceFlag{
70
-
Name: "enable-rule",
71
-
Usage: "Enable a rule with the given name.\nMay be specified multiple times.",
72
-
Value: nil,
73
-
Destination: &cliArgs.EnabledRules,
74
-
},
75
-
76
-
&cli.StringSliceFlag{
77
-
Name: "disable-rule",
78
-
Usage: "Disable a rule with the given name.\nMay be specified multiple times.",
79
-
Value: nil,
80
-
Destination: &cliArgs.DisabledRules,
81
-
},
54
+
//&cli.StringFlag{
55
+
// Name: "output-format",
56
+
// Usage: "The format of the linting results.\nSupported formats include \"yaml\", \"json\",\"github\" and \"summary\" table.\nYAML is the default.",
57
+
// Aliases: []string{"f"},
58
+
// Value: "",
59
+
// Destination: &cliArgs.FormatType,
60
+
//},
61
+
62
+
//&cli.StringSliceFlag{
63
+
// Name: "proto-path",
64
+
// Usage: "The folder for searching proto imports.\\nMay be specified multiple times; directories will be searched in order.\\nThe current working directory is always used.",
65
+
// Aliases: []string{"I"},
66
+
// Value: nil,
67
+
// Destination: &cliArgs.ProtoImportPaths,
68
+
//},
69
+
70
+
//&cli.StringSliceFlag{
71
+
// Name: "enable-rule",
72
+
// Usage: "Enable a rule with the given name.\nMay be specified multiple times.",
73
+
// Value: nil,
74
+
// Destination: &cliArgs.EnabledRules,
75
+
//},
76
+
//
77
+
//&cli.StringSliceFlag{
78
+
// Name: "disable-rule",
79
+
// Usage: "Disable a rule with the given name.\nMay be specified multiple times.",
0 commit comments