Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Phodal
Coca
提交
a9065651
C
Coca
项目概览
Phodal
/
Coca
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Coca
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
a9065651
编写于
12月 29, 2019
作者:
P
Phodal Huang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs: update help info
上级
5c102bb0
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
37 addition
and
41 deletion
+37
-41
README.md
README.md
+22
-26
cmd/analysis.go
cmd/analysis.go
+1
-1
cmd/api.go
cmd/api.go
+1
-1
cmd/arch.go
cmd/arch.go
+1
-1
cmd/bs.go
cmd/bs.go
+1
-1
cmd/call.go
cmd/call.go
+1
-1
cmd/cloc.go
cmd/cloc.go
+1
-1
cmd/concept.go
cmd/concept.go
+1
-1
cmd/count.go
cmd/count.go
+1
-1
cmd/evaluate.go
cmd/evaluate.go
+1
-1
cmd/git.go
cmd/git.go
+1
-1
cmd/rcall.go
cmd/rcall.go
+1
-1
cmd/suggest.go
cmd/suggest.go
+1
-1
cmd/tbs.go
cmd/tbs.go
+1
-1
cmd/todo.go
cmd/todo.go
+1
-1
cmd/version.go
cmd/version.go
+1
-1
未找到文件。
README.md
浏览文件 @
a9065651
...
...
@@ -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`
...
...
cmd/analysis.go
浏览文件 @
a9065651
...
...
@@ -19,7 +19,7 @@ var (
var
analysisCmd
=
&
cobra
.
Command
{
Use
:
"analysis"
,
Short
:
"analysis
packag
e"
,
Short
:
"analysis
cod
e"
,
Long
:
``
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
importPath
:=
analysisCmdConfig
.
Path
...
...
cmd/api.go
浏览文件 @
a9065651
...
...
@@ -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
...
...
cmd/arch.go
浏览文件 @
a9065651
...
...
@@ -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
)
...
...
cmd/bs.go
浏览文件 @
a9065651
...
...
@@ -19,7 +19,7 @@ var (
var
badsmellCmd
=
&
cobra
.
Command
{
Use
:
"bs"
,
Short
:
"
bad smell analysi
s"
,
Short
:
"
generate bad smell list and suggestion
s"
,
Long
:
``
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
importPath
:=
*&
bsCmdConfig
.
Path
...
...
cmd/call.go
浏览文件 @
a9065651
...
...
@@ -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
...
...
cmd/cloc.go
浏览文件 @
a9065651
...
...
@@ -8,7 +8,7 @@ import (
var
clocCmd
=
&
cobra
.
Command
{
Use
:
"cloc"
,
Short
:
"c
loc [FILE or DIRECTORY]
"
,
Short
:
"c
ount lines of code with complexity estimation
"
,
Long
:
fmt
.
Sprintf
(
"Sloc, Cloc and Code. Count lines of code in a directory with complexity estimation.
\n
Version %s
\n
Ben Boyter <ben@boyter.org> + Contributors"
,
processor
.
Version
),
Version
:
processor
.
Version
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
...
...
cmd/concept.go
浏览文件 @
a9065651
...
...
@@ -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
()
...
...
cmd/count.go
浏览文件 @
a9065651
...
...
@@ -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
...
...
cmd/evaluate.go
浏览文件 @
a9065651
...
...
@@ -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
...
...
cmd/git.go
浏览文件 @
a9065651
...
...
@@ -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
()
...
...
cmd/rcall.go
浏览文件 @
a9065651
...
...
@@ -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
...
...
cmd/suggest.go
浏览文件 @
a9065651
...
...
@@ -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
...
...
cmd/tbs.go
浏览文件 @
a9065651
...
...
@@ -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
)
...
...
cmd/todo.go
浏览文件 @
a9065651
...
...
@@ -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
()
...
...
cmd/version.go
浏览文件 @
a9065651
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录