MCPcopy Create free account
hub / github.com/Permify/permify / NewCoverageCommand

Function NewCoverageCommand

pkg/cmd/coverage.go:19–38  ·  view source on GitHub ↗

NewCoverageCommand - creates a new coverage command

()

Source from the content-addressed store, hash-verified

17
18// NewCoverageCommand - creates a new coverage command
19func NewCoverageCommand() *cobra.Command {
20 command := &cobra.Command{
21 Use: "coverage <file>",
22 Short: "coverage analysis of authorization model and assertions",
23 RunE: coverage(),
24 Args: cobra.ExactArgs(1),
25 }
26
27 f := command.Flags()
28 f.Int("coverage-relationships", 0, "the min coverage for relationships")
29 f.Int("coverage-attributes", 0, "the min coverage for attributes")
30 f.Int("coverage-assertions", 0, "the min coverage for assertions")
31
32 // register flags for coverage
33 command.PreRun = func(cmd *cobra.Command, args []string) {
34 flags.RegisterCoverageFlags(f)
35 }
36
37 return command
38}
39
40// coverage - coverage analysis of authorization model and assertions
41func coverage() func(cmd *cobra.Command, args []string) error {

Callers 1

mainFunction · 0.92

Calls 2

RegisterCoverageFlagsFunction · 0.92
coverageFunction · 0.90

Tested by

no test coverage detected