Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

Commit

Permalink
(GH-119) Provide IIssue.Column (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Jul 16, 2020
1 parent 9a39cb6 commit 6e4fa20
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The [Cake.Issues.EsLint addin] provides the following features.
| <span class="glyphicon glyphicon-ok" style="color:green"></span> | `IIssue.AffectedFileRelativePath` | |
| <span class="glyphicon glyphicon-ok" style="color:green"></span> | `IIssue.Line` | |
| <span class="glyphicon glyphicon-remove" style="color:red"></span> | `IIssue.EndLine` | |
| <span class="glyphicon glyphicon-remove" style="color:red"></span> | `IIssue.Column` | |
| <span class="glyphicon glyphicon-ok" style="color:green"></span> | `IIssue.Column` | |
| <span class="glyphicon glyphicon-remove" style="color:red"></span> | `IIssue.EndColumn` | |
| <span class="glyphicon glyphicon-ok" style="color:green"></span> | `IIssue.MessageText` | |
| <span class="glyphicon glyphicon-remove" style="color:red"></span> | `IIssue.MessageHtml` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void Should_Read_Issue_Correct()
"'addOne' is defined but never used.",
"Cake.Issues.EsLint.EsLintIssuesProvider",
"ESLint")
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 1)
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 1, 10)
.OfRule("no-unused-vars", new Uri("http://eslint.org/docs/rules/no-unused-vars"))
.WithPriority(IssuePriority.Error)
.Create());
Expand All @@ -51,7 +51,7 @@ public void Should_Read_Issue_Correct()
"Use the isNaN function to compare with NaN.",
"Cake.Issues.EsLint.EsLintIssuesProvider",
"ESLint")
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 2)
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 2, 9)
.OfRule("use-isnan", new Uri("http://eslint.org/docs/rules/use-isnan"))
.WithPriority(IssuePriority.Error)
.Create());
Expand All @@ -61,7 +61,7 @@ public void Should_Read_Issue_Correct()
"Unexpected space before unary operator '++'.",
"Cake.Issues.EsLint.EsLintIssuesProvider",
"ESLint")
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 3)
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 3, 16)
.OfRule("space-unary-ops", new Uri("http://eslint.org/docs/rules/space-unary-ops"))
.WithPriority(IssuePriority.Error)
.Create());
Expand All @@ -71,7 +71,7 @@ public void Should_Read_Issue_Correct()
"Missing semicolon.",
"Cake.Issues.EsLint.EsLintIssuesProvider",
"ESLint")
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 3)
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 3, 20)
.OfRule("semi", new Uri("http://eslint.org/docs/rules/semi"))
.WithPriority(IssuePriority.Warning)
.Create());
Expand All @@ -81,7 +81,7 @@ public void Should_Read_Issue_Correct()
"Unnecessary 'else' after 'return'.",
"Cake.Issues.EsLint.EsLintIssuesProvider",
"ESLint")
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 4)
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 4, 12)
.OfRule("no-else-return", new Uri("http://eslint.org/docs/rules/no-else-return"))
.WithPriority(IssuePriority.Warning)
.Create());
Expand All @@ -91,7 +91,7 @@ public void Should_Read_Issue_Correct()
"Expected indentation of 8 spaces but found 6.",
"Cake.Issues.EsLint.EsLintIssuesProvider",
"ESLint")
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 5)
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 5, 1)
.OfRule("indent", new Uri("http://eslint.org/docs/rules/indent"))
.WithPriority(IssuePriority.Warning)
.Create());
Expand All @@ -101,7 +101,7 @@ public void Should_Read_Issue_Correct()
"Function 'addOne' expected a return value.",
"Cake.Issues.EsLint.EsLintIssuesProvider",
"ESLint")
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 5)
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 5, 7)
.OfRule("consistent-return", new Uri("http://eslint.org/docs/rules/consistent-return"))
.WithPriority(IssuePriority.Error)
.Create());
Expand All @@ -111,7 +111,7 @@ public void Should_Read_Issue_Correct()
"Missing semicolon.",
"Cake.Issues.EsLint.EsLintIssuesProvider",
"ESLint")
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 5)
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 5, 13)
.OfRule("semi", new Uri("http://eslint.org/docs/rules/semi"))
.WithPriority(IssuePriority.Warning)
.Create());
Expand All @@ -121,7 +121,7 @@ public void Should_Read_Issue_Correct()
"Unnecessary semicolon.",
"Cake.Issues.EsLint.EsLintIssuesProvider",
"ESLint")
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 7)
.InFile(@"src\Cake.Issues.EsLint.Tests\Testfiles\fullOfProblems.js", 7, 2)
.OfRule("no-extra-semi", new Uri("http://eslint.org/docs/rules/no-extra-semi"))
.WithPriority(IssuePriority.Error)
.Create());
Expand Down
2 changes: 1 addition & 1 deletion src/Cake.Issues.EsLint/LogFileFormat/JsonLogFileFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public JsonLogFileFormat(ICakeLog log)
select
IssueBuilder
.NewIssue(message.message, issueProvider)
.InFile(GetRelativeFilePath(file.filePath, repositorySettings), message.line)
.InFile(GetRelativeFilePath(file.filePath, repositorySettings), message.line, message.column)
.OfRule(rule, EsLintRuleUrlResolver.Instance.ResolveRuleUrl(rule))
.WithPriority(GetPriority(message.severity))
.Create();
Expand Down

0 comments on commit 6e4fa20

Please sign in to comment.