未验证 提交 a9065651 编写于 作者: P Phodal Huang

docs: update help info

上级 5c102bb0
......@@ -10,39 +10,35 @@ Refactoring Modeling:
![Refactoring Modeling](docs/images/model.svg)
## Usage
install
features:
```bash
go get -u github.com/phodal/coca
```
help:
```bash
Usage:
coca [command]
Available Commands:
analysis analysis package
api scan api
bs bad smell analysis
call call graph api
cloc cloc [FILE or DIRECTORY]
concept concept api
count count code
evaluate evaluate refactor effort
git git analysis
analysis analysis code
api scan HTTP api from annotation
arch project package visualization
bs generate bad smell list and suggestions
call show call graph with specific method
cloc count lines of code with complexity estimation
concept build domain concept from source code
count count most refs function
evaluate evaluate code situation and refactor effort
git analysis git commit history for revs count, summary and suggest
help Help about any command
rcall reverse call
rcall reverse call graph visualization
refactor auto refactor code
suggest simple holmes
todo scan todo
version print the version number of Coca
suggest find usable Design Patterns from code
tbs generate tests bad smell
todo scan all todo, and list with time
version version
```
## Usage
install
```bash
go get -u github.com/phodal/coca
```
1. Run `coca analysis`
......
......@@ -19,7 +19,7 @@ var (
var analysisCmd = &cobra.Command{
Use: "analysis",
Short: "analysis package",
Short: "analysis code",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
importPath := analysisCmdConfig.Path
......
......@@ -39,7 +39,7 @@ var (
var apiCmd = &cobra.Command{
Use: "api",
Short: "scan api",
Short: "scan HTTP api from annotation",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
path := apiCmdConfig.Path
......
......@@ -23,7 +23,7 @@ var (
var archCmd = &cobra.Command{
Use: "arch",
Short: "generate arch",
Short: "project package visualization",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
identifiers = adapter.LoadIdentify(apiCmdConfig.DependencePath)
......
......@@ -19,7 +19,7 @@ var (
var badsmellCmd = &cobra.Command{
Use: "bs",
Short: "bad smell analysis",
Short: "generate bad smell list and suggestions",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
importPath := *&bsCmdConfig.Path
......
......@@ -22,7 +22,7 @@ var (
var callGraphCmd = &cobra.Command{
Use: "call",
Short: "call graph api",
Short: "show call graph with specific method",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
var parsedDeps []models.JClassNode
......
......@@ -8,7 +8,7 @@ import (
var clocCmd = &cobra.Command{
Use: "cloc",
Short: "cloc [FILE or DIRECTORY]",
Short: "count lines of code with complexity estimation",
Long: fmt.Sprintf("Sloc, Cloc and Code. Count lines of code in a directory with complexity estimation.\nVersion %s\nBen Boyter <ben@boyter.org> + Contributors", processor.Version),
Version: processor.Version,
Run: func(cmd *cobra.Command, args []string) {
......
......@@ -17,7 +17,7 @@ var parsedDeps []models.JClassNode
var conceptCmd = &cobra.Command{
Use: "concept",
Short: "concept api",
Short: "build domain concept from source code",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
dependence := cmd.Flag("dependence").Value.String()
......
......@@ -26,7 +26,7 @@ var cparsedDeps []models.JClassNode
var countCmd = &cobra.Command{
Use: "count",
Short: "count code",
Short: "count most refs function",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
dependence := countCmdConfig.DependencePath
......
......@@ -24,7 +24,7 @@ var (
var evaluateCmd = &cobra.Command{
Use: "evaluate",
Short: "evaluate refactor effort",
Short: "evaluate code situation and refactor effort",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
dependence := *&evaluateConfig.DependencePath
......
......@@ -27,7 +27,7 @@ var (
var gitCmd = &cobra.Command{
Use: "git",
Short: "git analysis",
Short: "analysis git commit history for revs count, summary and suggest",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
message := getCommitMessage()
......
......@@ -24,7 +24,7 @@ var (
var reverseCmd = &cobra.Command{
Use: "rcall",
Short: "reverse call",
Short: "reverse call graph visualization",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
dependence := *&reverseConfig.DependencePath
......
......@@ -17,7 +17,7 @@ var (
var suggestCmd = &cobra.Command{
Use: "suggest",
Short: "simple holmes",
Short: "find usable Design Patterns from code",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
parsedDeps = nil
......
......@@ -20,7 +20,7 @@ var (
var tbsCmd = &cobra.Command{
Use: "tbs",
Short: "test bad smell",
Short: "generate tests bad smell",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
files := support.GetJavaTestFiles(tbsCmdConfig.Path)
......
......@@ -22,7 +22,7 @@ var (
var todoCmd = &cobra.Command{
Use: "todo",
Short: "scan todo",
Short: "scan all todo, and list with time",
Long: ``,
Run: func(cmd *cobra.Command, args []string) {
path := cmd.Flag("path").Value.String()
......
......@@ -12,7 +12,7 @@ func init() {
var versionCmd = &cobra.Command{
Use: "version",
Short: "print the version number of Coca",
Short: "version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Coca Version: " + config.VERSION + " -- HEAD")
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册