2 Star 1 Fork 0

HaoYP / sonar-dotnet

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
Andrei Epure 提交于 2019-04-02 11:34 . Add rspec README (#2364)

General info

The rspec.ps1 script downloads and calls the rule-api JAR.

The sonarpedia.json file is used by:

  • the releasability check
  • rules.sonarsource.com

How to use

For details, you can read the powershell code inside rspec.ps1.

Usage 1: update all rules or language metadata. Basically, the rule-api JAR will update: sonarway_profile*, *.html and *.json, sonarpedia.json.

rspec cs
rspec vbnet

Usage 2: pull metadata (replace or create) for rule BUT sonarway_profile* will not be updated

rspec cs S1234

Usage 3: like Usage 2, but also creates scaffolding.

  • Should not be used to update, just to create a new rule (including to create the vbnet impl for an existing cs rule).
  • For updates, use Usage 1 or Usage 2
rspec cs S1234 ClassName

Possible improvements

  • for Usage 3, check in the script if the scaffolding has already been created and stop if so, issuing a warning message. Currently, running Usage 3 twice messes up the scaffolding.
  • change the hardcoded ruleapi link with the environment variable that is now on all computers
C#
1
https://gitee.com/haoyp1985_admin/sonar-dotnet.git
git@gitee.com:haoyp1985_admin/sonar-dotnet.git
haoyp1985_admin
sonar-dotnet
sonar-dotnet
master

搜索帮助