reading notes about analyzing with SonarRunner

A) Install the sonar runner
A1) Download link
reference link
http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+SonarQube+Runner
A2) Install SonarRunner
2) uncompress
$ unzip sonar-runner-dist-2.3.zip
file list
~/.tools/sonar-runner-2.3/
|-- bin
|   |-- sonar-runner
|   `-- sonar-runner.bat
|-- conf
|   `-- sonar-runner.properties
`-- lib
    `-- sonar-runner-dist-2.3.jar

3) update global setting, these setting can be put in the parameter when sonar is running.
conf/sonar-runner.properties
#Configure here general information about the environment, such as SonarQube DB details for example
#No information about specific project should appear here
#----- Default SonarQube server
sonar.host.url=http://localhost:9000
#----- PostgreSQL
#sonar.jdbc.url=jdbc:postgresql://localhost/sonar
#----- MySQL
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
#----- Oracle
#sonar.jdbc.url=jdbc:oracle:thin:@localhost/XE
#----- Microsoft SQLServer
#sonar.jdbc.url=jdbc:jtds:sqlserver://localhost/sonar;SelectMethod=Cursor
#----- Global database settings
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
#----- Default source code encoding
sonar.sourceEncoding=UTF-8
#----- Security (when 'sonar.forceAuthentication' is set to 'true')
#sonar.login=admin
#sonar.password=admin

uncomment   highlight line
How to install sonar? This will be in the next reading note.

4) Create a sonar home
$ vi ~/.bash_profile 
export SONAR_RUNNER_HOME=~/.tools/sonar-runner-2.3
PATH=$SONAR_RUNNER_HOME/bin
export PATH

5) check install status
$ sonar-runner -v
SonarQube Runner 2.3
Java 1.6.0_12 Sun Microsystems Inc. (64-bit)
Linux 2.6.18-164.el5 amd64

Installation is ok


B) Analyzing with SonarRuner
command line: 
$ sonar-runner
B1) Simple project
1) Create a configuration file in the root directory of the project
sonar-porject.properties
# Required metadata
sonar.projectKey=java-sonar-runner-simple
sonar.projectName=Simple Java project analyzed with the SonarQube Runner
sonar.projectVersion=1.0

# Comma-separated paths to directories with sources (required)
sonar.sources=src

# Language
sonar.language=java

# Encoding of the source files
sonar.sourceEncoding=UTF-8

Highlight line should be change denpend your project. And this info will show in the sonar page.

B2) Multi-module project
1) way #1
set all the configuration in the properties in the root folder
|-- java-sonar-runner-modules-different-structures
| |-- Module 2
| |     `-- sources
| |           `-- Helloworld2.java
| |-- module1
| |     `-- src
| |           `-- Helloworld1.java
| |-- sonar-project.properties

sonar-project.properties file

sonar.projectKey=java-sonar-runner-modules-different-structures
sonar.projectName=Multi-module Java project analyzed with the SonarQube Runner (modules have different structures)
sonar.projectVersion=1.0

# Set modules IDs
sonar.modules=module1,module2

# Modules inherit properties set at parent level
sonar.sources=src
sonar.sourceEncoding=UTF-8
sonar.language=java

# Default module base directory is <curent_directory>/<module_ID>
# It has to be overriden for module2
module2.sonar.projectBaseDir=Module 2

# Overrides some parent properties in module2
module2.sonar.sources=sources
module2.sonar.projectName=Module #2

2) way #2
set the configuration in the multiple properties files. These files will be put in the each module.
|-- java-sonar-runner-modules-own-configuration-file
| |-- Module 2
| |      |-- sonar-project.properties
| |      `-- sources
| |             `-- Helloworld2.java
| |-- module1
| |      |-- sonar-project.properties
| |      `-- src
| |             `-- Helloworld1.java
| |-- sonar-project.properties

root property
sonar.projectKey=java-sonar-runner-modules-own-configuration-file
sonar.projectName=Multi-module Java project analyzed with the SonarQube Runner (each module has its own configuration file)
sonar.projectVersion=1.0

# Set modules IDs
sonar.modules=module1,module2

# Modules inherit properties set at parent level
sonar.sources=src
sonar.sourceEncoding=UTF-8
sonar.language=java

# By default, the base directory for a module is <current_dir>/<module_ID>.
module2.sonar.projectBaseDir=Module 2

module1 property
sonar.projectName=Module #1     (name can be any one, other property will be inherited from root sonar.properties)

module2 property
sonar.projectName=Module #2
sonar.sources=sources

Noteworthy:
1) Children module will inherit their parent's properties
2) Module base directory(src directory) can be specified for special case

B3) Multi-module & Multi-language project
The other setting is the same with Multi-module project's configuration.
The different is each module's language. It can be set in the sonar.properties
module1.sonar.language=java
module2.sonar.language=js

B4) Running Other Tasks
#Before SonarQube 3.6, it was only possible to run a project analysis. Since SonarQube 3.6, it is possible to run other tasks such as:# To run the computation of views (Views plugin is required)
sonar-runner views
 
# To run the computation of reports (Report plugin is required)
sonar-runner report
 
# To run the computation of developer data (Developer Cockpit plugin is required)
sonar-runner devcockpit

B5) Advanced Usage
1) if thers's no sonar-project.properties file. Some setting can be set as parameter, like below:
sonar-runner -Dsonar.projectKey=myproject -Dsonar.sources=src1

2) if sonar settubg name is not sonar-project.properties. You can set it
Ex:
sonar-runner -Dproject.settings=../myproject.properties

C) Troubleshooting
c1) out of memory
you can set SONAR_RUNNER_OPTS
Ex:
export SONAR_RUNNER_OPTS="-Xmx888m -XX:MaxPermSize=888m"

D) Noteworthy
d1) sonar runner cannot support cobertura, only maven support.
if you want to use sonar-runner to analyz, you need to generate a report before sonar analyz.

rex ding@2013-12-25

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
分析神经时间序列数据是指通过对大脑神经活动的电信号数据进行处理和解读,以了解大脑的工作机制和功能。神经时间序列数据通常是通过脑电图(EEG)、脑磁图(MEG)、功能磁共振成像(fMRI)等技术获取。 在分析神经时间序列数据时,首先需要对数据进行预处理。这包括数据清洗(去除噪声)、滤波(提取感兴趣的频率带)、降采样等步骤。 接下来,可以通过不同的分析方法来研究神经数据。一种常见的方法是事件相关电位(ERP)分析,它可以用来检测特定刺激或事件引发的大脑电信号变化。另一种方法是时频分析,它可以揭示出不同频率分量在时间上的变化,可以帮助我们理解不同的认知过程。 此外,还有一些高级的分析方法可以用于处理神经时间序列数据。例如,独立成分分析(ICA)可以通过对数据进行分解,找出不同的独立成分,并帮助我们分辨出不同的脑区活动。另一个例子是相干性分析,可以用于研究不同脑区之间的功能连接。 最后,通过将神经时间序列数据与行为数据或临床数据进行关联分析,我们可以进一步了解大脑活动与行为或疾病之间的关系。 总而言之,分析神经时间序列数据是一个复杂而关键的过程,通过合理的预处理和选择合适的分析方法,我们可以从这些数据中获得对大脑功能和认知过程的更深入理解,并为神经科学研究和临床应用提供重要指导。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值