Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions cmd/cycles.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ var cyclesCmd = &cobra.Command{
Use: "cycles",
Short: "Prints cycles in dependency chains.",
Long: `Will show all the cycles in the dependencies of the project.`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {

if len(args) != 0 {
return fmt.Errorf("cycles does not take any arguments")
}

overview := getDepInfo(nil)
var cycleChains []Chain
var temp Chain
Expand Down
6 changes: 1 addition & 5 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@ var listCmd = &cobra.Command{
Short: "Lists all project dependencies",
Long: `Gives a list of all the dependencies of the project.
These include both direct as well as transitive dependencies.`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {

if len(args) != 0 {
return fmt.Errorf("list does not take any arguments")
}

depGraph := getDepInfo(nil)
fmt.Println("List of all dependencies:")
allDeps := getAllDeps(depGraph.DirectDepList, depGraph.TransDepList)
Expand Down
5 changes: 1 addition & 4 deletions cmd/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,10 @@ var statsCmd = &cobra.Command{
2. Transitive Dependencies: Total number of transitive dependencies (dependencies which are further needed by direct dependencies of the project)
3. Total Dependencies: Total number of dependencies of the mainModule(s)
4. Max Depth of Dependencies: Length of the longest chain starting from the first mainModule; defaults to length from the first module encountered in "go mod graph" output`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
depGraph := getDepInfo(mainModules)

if len(args) != 0 {
return fmt.Errorf("stats does not take any arguments")
}

// get the longest chain
var temp Chain
longestChain := getLongestChain(depGraph.MainModules[0], depGraph.Graph, temp, map[string]Chain{})
Expand Down
Loading