java代码自动审查 开源_Codebrag: 开源的代码审查工具

Codebrag

THIS PROJECT IS NOT MAINTAINED! FEEL FREE TO FORK :)

Below is a developer guide if you want to hack on Codebrag yourself.

If you are looking for general information on the project, please see the main website.

If you are just looking for installation or upgrade instructions, please refer to the wiki.

Developer guide

Prerequisites:

sbt 0.13.6

nodejs 0.10.13 or newer (make sure node and npm are available on PATH)

Quick Start

Configure local.conf in the codebrag home directory basing on codebrag-rest/src/main/resources/application.conf.template

Checkout a SVN/Git repository to chosen repos-root folder - Codebrag won't do that for you!

Navigate to the codebrag home directory

Execute ./run.sh script

Default browser should open at localhost:9090

Working with the application:

Go to project dir

Configure local.conf in the codebrag home directory basing on codebrag-rest/src/main/resources/application.conf.template

Start sbt with sbt

Open project in your favorite IDE

Run backend server on jetty with ~ container:start. Project will be recompiled & redeployed every time Scala sources will be changed.

Go to codebrag-ui project. If this is your first attempt, run npm install. This will install all the dependencies required to start UI Codebrag application. Then run ./node_modules/.bin/grunt server. If you have grunt installed globally you can use grunt server instead.

Default browser should open at http://localhost:9090

For more information about UI application build please consult README in codebrag-ui project

Run Codebrag with stubbed backend

You may want to run Codebrag without backend services e.g. to work on frontend side (HTML, CSS). Follow the instructions in codebrag-ui project README to install all required stuff. When Codebrag is run, appending ?nobackend to any URL lets you work with stubbed data - with no backend required.

Skipping slow tests

If you want to execute tests from sbt and skip slow cases requiring database, you can execute following command: test-only * -- -l requiresDb

Logging

For logging we use SLF4J+Logback. An example configration file can be found in scripts/logback-example.xml. To use a configuration file, either place a logback.xml file in the bundle, or specify an external one using -Dlogback.configurationFile.

Create distribution

Start sbt, change subproject: project codebrag-dist

Run: assembly

This will create a fat-jar. To start Codebrag with the given configuration, run:

java -Dconfig.file=[path to .conf file] -Dlogback.configurationFile=logback.xml -jar codebrag-dist-assembly-[version].jar

H2 console

When using the embedded SQL storage, it may be useful to browse the tables. H2 provides consoles, which can be run as follows:

For a web console, run from sbt: codebrag-dao/runH2Console

For a command line console, run java -Dconfig.file=codebrag.conf -cp [path to the fat JAR] com.softwaremill.codebrag.dao.sql.H2ShellConsole

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值