Skip to content

Commit fe12dfa

Browse files
rsteubetshaynik
andcommitted
added bazel
initial structure without completions Co-authored-by: tshaynik <tshaynik@proton.me>
1 parent 2e6c773 commit fe12dfa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3790
-0
lines changed

completers/common/bazel_completer/cmd/aquery.go

Lines changed: 211 additions & 0 deletions
Large diffs are not rendered by default.

completers/common/bazel_completer/cmd/build.go

Lines changed: 198 additions & 0 deletions
Large diffs are not rendered by default.

completers/common/bazel_completer/cmd/canonicalizeFlags.go

Lines changed: 204 additions & 0 deletions
Large diffs are not rendered by default.

completers/common/bazel_completer/cmd/clean.go

Lines changed: 203 additions & 0 deletions
Large diffs are not rendered by default.

completers/common/bazel_completer/cmd/config.go

Lines changed: 201 additions & 0 deletions
Large diffs are not rendered by default.

completers/common/bazel_completer/cmd/coverage.go

Lines changed: 204 additions & 0 deletions
Large diffs are not rendered by default.

completers/common/bazel_completer/cmd/cquery.go

Lines changed: 211 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var dumpCmd = &cobra.Command{
9+
Use: "dump",
10+
Short: "Dumps the internal state of the %{product} server process.",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(dumpCmd).Standalone()
16+
17+
dumpCmd.Flags().Bool("action_cache", false, "Dump action cache content.")
18+
dumpCmd.Flags().String("memory", "", "Dump the memory use of the given Skyframe node.")
19+
dumpCmd.Flags().Bool("noaction_cache", false, "Dump action cache content.")
20+
dumpCmd.Flags().Bool("nopackages", false, "Dump package cache content.")
21+
dumpCmd.Flags().Bool("norule_classes", false, "Dump rule classes.")
22+
dumpCmd.Flags().Bool("norules", false, "Dump rules, including counts and memory usage (if memory is tracked).")
23+
dumpCmd.Flags().Bool("packages", false, "Dump package cache content.")
24+
dumpCmd.Flags().Bool("rule_classes", false, "Dump rule classes.")
25+
dumpCmd.Flags().Bool("rules", false, "Dump rules, including counts and memory usage (if memory is tracked).")
26+
dumpCmd.Flags().String("skyframe", "", "Dump the Skyframe graph.")
27+
dumpCmd.Flags().String("skykey_filter", "", "Regex filter of SkyKey names to output. Only used with --skyframe=deps, rdeps, function_graph.")
28+
dumpCmd.Flags().String("skylark_memory", "", "Dumps a pprof-compatible memory profile to the specified path. To learn more please see https://github.com/google/pprof.")
29+
rootCmd.AddCommand(dumpCmd)
30+
}

completers/common/bazel_completer/cmd/fetch.go

Lines changed: 211 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var helpCmd = &cobra.Command{
9+
Use: "help",
10+
Short: "Prints help for commands, or the index.",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func init() {
15+
carapace.Gen(helpCmd).Standalone()
16+
17+
helpCmd.Flags().String("help_verbosity", "", "Select the verbosity of the help command.")
18+
helpCmd.Flags().StringP("long", "l", "", "Show full description of each option, instead of just its name.")
19+
helpCmd.Flags().String("short", "", "Show only the names of the options, not their types or meanings.")
20+
rootCmd.AddCommand(helpCmd)
21+
}

0 commit comments

Comments
 (0)