Skip to content

Commit

Permalink
SONARCS-560 Fix SonarLint exported analyzer and namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolkensteyn committed Dec 4, 2015
1 parent fd1e7a7 commit 9aef340
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void exportProfile(RulesProfile ruleProfile, Writer writer) {

appendLine(writer, "<?xml version=\"1.0\" encoding=\"utf-8\"?>");
appendLine(writer, "<RuleSet Name=\"Rules for SonarLint\" Description=\"This rule set was automatically generated from SonarQube.\" ToolsVersion=\"14.0\">");
appendLine(writer, " <Rules AnalyzerId=\"SonarLint\" RuleNamespace=\"SonarLint\">");
appendLine(writer, " <Rules AnalyzerId=\"SonarLint.CSharp\" RuleNamespace=\"SonarLint.CSharp\">");

for (ActiveRule activeRule : ruleProfile.getActiveRulesByRepository(CSharpPlugin.REPOSITORY_KEY)) {
Rule rule = activeRule.getRule();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void test() {
assertThat(writer.toString()).isEqualTo(
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" +
"<RuleSet Name=\"Rules for SonarLint\" Description=\"This rule set was automatically generated from SonarQube.\" ToolsVersion=\"14.0\">\r\n" +
" <Rules AnalyzerId=\"SonarLint\" RuleNamespace=\"SonarLint\">\r\n" +
" <Rules AnalyzerId=\"SonarLint.CSharp\" RuleNamespace=\"SonarLint.CSharp\">\r\n" +
" <Rule Id=\"S1004\" Action=\"Warning\" />\r\n" +
" <Rule Id=\"S1002\" Action=\"None\" />\r\n" +
" </Rules>\r\n" +
Expand Down

1 comment on commit 9aef340

@dbolkensteyn
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit actually fixes this issue: https://jira.sonarsource.com/browse/SONARCS-565

Please sign in to comment.