Home

Awesome

Coco

Coco Build

(aka coconut, juice), an automatic DevOps metrics analysis tool.

case studies: Coco cases

Online Demos:

OS: macOS, Windows, GNU/Linux

Usage

  1. install or download Coco components from release, and download ctags: windows
  2. use coco init to generate config file
  3. config coco.yml
  4. optional: use coco plugins to download plugins
  5. run Coco
    • coco, gather data from source
    • visual, visualization of data
    • suggest, generate suggestion
  6. download plugins (optional)
    • coco_container,container analysis
    • coco_pipeline,pipeline analysis
    • coco_struct,model analysis by ctags
    • coco_swagger,Swagger API Analysis

visual URL:

Offline usage:

  1. download coco, visual e``xec file
  2. download coco_plugins_xxxx with platform
  3. extract coco_plugins_xxxx to plugins dir

Coco Usage

coco 0.5.3

USAGE:
    coco [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -b, --branches <branches>            With all branches [default: true]
        --commits <commits>              With all commits [default: true]
    -c, --config-file <config-file>      Config file .yml [default: coco.yml]
    -d, --debug <debug>                  Debug mode [default: false]
    -f, --file-history <file-history>    Scan file change list from git & cloc [default: false]
    -y, --git-years <git-years>          Set git commits scan years, default 1, [default: 1.0]
    -t, --tags <tags>                    With all tags [default: true]

SUBCOMMANDS:
    help       Prints this message or the help of the given subcommand(s)
    init       Create default coco.yml files
    plugins    Download plugins from GitHub

sample:

coco --file-history=true --git-years=3

coco.yml

配置 (config in Chinese)

示例:

# 代码库
repos:
  - url: https://github.com/coco-rs/coco.fixtures
  - url: https://github.com/coco-rs/coco.fixtures2
  - url: .
    languages: [Rust]
  - url: https://github.com/datum-lang/scie
  - url: https://github.com/projectfluent/fluent-rs
    languages: [Rust, JavaScript]                     # set languages for struct analysis

plugins:
  - name: swagger
  - name: struct
    config:
      - key: ctags                       # set location for macOS ctags path
        value: /usr/local/bin/ctags
        
git:
  local: true # true will use `git clone`, false will use libgit2

Documents

Development

See in DEVELOPMENT.md

Online video

Bilibili: 研发效能分析工具 Coco 第一次线上讨论

Roadmap

analysis and reporter

analysis

reporter

suggest and case study

Tech

Todo

Visual and Reporter

DevOps pipeline

Tech Debt Integration

Documents

Refs: Libgit2 Documents

FAQ

How to install in macOS?

Step1

Download Coco to your Mac from release

Step2

Move it(Coco) to your preferred directory,such as:

mkdir ~/.coco
mv ~/Downloads/coco_macos ~/.coco/

Step3

Set up an alias to make it easier to use,such as:

export 'alias coco="~/.coco/coco_macos"' >> ~/.zshrc

Step4

Try to use execute it by alias coco:

coco -h

If it show no permission,you can execute the following command:

chmod -R u=rwx,g=rw,o=r ~/.coco/coco_macos

Then retry:

coco -h

Good luck!

Thanks

Jetbrains

License

ctags analysis based on https://github.com/dalance/ptags with MIT, see in src

ctags parser rewrite from Golang's https://github.com/ruben2020/tags2uml with Apache License.

@ 2020~2021 This code is distributed under the MIT license. See LICENSE in this directory.