Skip to content

Commit

Permalink
updated version number
Browse files Browse the repository at this point in the history
  • Loading branch information
moly committed Feb 8, 2021
1 parent 87d691a commit b2f7334
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,4 @@ $RECYCLE.BIN/
##
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.vscode/
18 changes: 12 additions & 6 deletions src/ReSharperToCodeClimate/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@
using System.Text.Json;
using System.Xml.Linq;

namespace ReSharperToCodeclimate
namespace ReSharperToCodeClimate
{
class Program
{
static void Main(string[] args)
{
if(args.Length != 2)
{
Console.WriteLine("Usage: dotnet resharper-to-codeclimate imput.xml output.json");
Environment.Exit(1);
}

List<CodeClimateIssue> codeClimateReport = new List<CodeClimateIssue>();

XElement resharperReport = XElement.Load(args[0]);
Dictionary<string, string> severityByIssueType = CreateSeverityByIssueTypeDictionary(resharperReport.Descendants("IssueType"));
XElement reSharperReport = XElement.Load(args[0]);
Dictionary<string, string> severityByIssueType = CreateSeverityByIssueTypeDictionary(reSharperReport.Descendants("IssueType"));

foreach (XElement issue in resharperReport.Descendants("Issue"))
foreach (XElement issue in reSharperReport.Descendants("Issue"))
{
codeClimateReport.Add(
new CodeClimateIssue()
Expand All @@ -43,7 +49,7 @@ static void Main(string[] args)

private static Dictionary<string, string> CreateSeverityByIssueTypeDictionary(IEnumerable<XElement> issueTypes)
{
Dictionary<string, string> codeClimateSeverityByResharperSeverity = new Dictionary<string, string>()
Dictionary<string, string> codeClimateSeverityByReSharperSeverity = new Dictionary<string, string>()
{
{"ERROR", "critical"},
{"WARNING", "major"},
Expand All @@ -55,7 +61,7 @@ private static Dictionary<string, string> CreateSeverityByIssueTypeDictionary(IE

foreach (var issueType in issueTypes)
{
string severity = codeClimateSeverityByResharperSeverity[issueType.Attribute("Severity").Value];
string severity = codeClimateSeverityByReSharperSeverity[issueType.Attribute("Severity").Value];
serverityByIssueType.Add(issueType.Attribute("Id").Value, severity);
}

Expand Down
4 changes: 2 additions & 2 deletions src/ReSharperToCodeClimate/ReSharperToCodeClimate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
<RootNamespace>ReSharperToCodeClimate</RootNamespace>
<AssemblyName>resharper-to-codeclimate</AssemblyName>
<PackAsTool>true</PackAsTool>
<PackageId>resharper-to-codeclimate</PackageId>
<Authors>Thomas Weston</Authors>
<PackageDescription>Converts a ReSharper inspectcode xml report file to a Code Climate json report file.</PackageDescription>
<PackageReleaseNotes>Added severity info</PackageReleaseNotes>
<PackageReleaseNotes>Removed Json.Net dependency</PackageReleaseNotes>
<PackageProjectUrl>https://github.com/moly/resharper-to-codeclimate</PackageProjectUrl>
<RepositoryUrl>https://github.com/moly/resharper-to-codeclimate</RepositoryUrl>
<PackageTags>resharper codeclimate gitlab</PackageTags>
Expand Down

0 comments on commit b2f7334

Please sign in to comment.