Skip to content

Commit

Permalink
Don't pass FileLinkSettings to issue provider (#195)
Browse files Browse the repository at this point in the history
File link settings are already available in the settings property.
  • Loading branch information
pascalberger authored Aug 1, 2020
1 parent bece6c4 commit fd2ded6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Cake.Issues.Testing/FakeConfigurableIssueProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public FakeConfigurableIssueProvider(
public override string ProviderName => "Fake Issue Provider";

/// <inheritdoc/>
protected override IEnumerable<IIssue> InternalReadIssues(FileLinkSettings fileLinkSettings)
protected override IEnumerable<IIssue> InternalReadIssues()
{
return this.issues;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Cake.Issues.Testing/FakeIssueProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public FakeIssueProvider(ICakeLog log, IEnumerable<IIssue> issues)
public override string ProviderName => "Fake Issue Provider";

/// <inheritdoc/>
protected override IEnumerable<IIssue> InternalReadIssues(FileLinkSettings fileLinkSettings)
protected override IEnumerable<IIssue> InternalReadIssues()
{
return this.issues;
}
Expand Down
5 changes: 2 additions & 3 deletions src/Cake.Issues/BaseIssueProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ public IEnumerable<IIssue> ReadIssues()
{
this.AssertInitialized();

return this.InternalReadIssues(this.Settings.FileLinkSettings);
return this.InternalReadIssues();
}

/// <summary>
/// Gets all issues.
/// Compared to <see cref="ReadIssues"/> it is safe to access Settings from this method.
/// </summary>
/// <param name="fileLinkSettings">Settings which can be used for resolving links to source files.</param>
/// <returns>List of issues.</returns>
protected abstract IEnumerable<IIssue> InternalReadIssues(FileLinkSettings fileLinkSettings);
protected abstract IEnumerable<IIssue> InternalReadIssues();
}
}
2 changes: 1 addition & 1 deletion src/Cake.Issues/BaseMultiFormatIssueProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected BaseMultiFormatIssueProvider(ICakeLog log, TSettings settings)
}

/// <inheritdoc/>
protected override IEnumerable<IIssue> InternalReadIssues(FileLinkSettings fileLinkSettings)
protected override IEnumerable<IIssue> InternalReadIssues()
{
return
this.IssueProviderSettings.Format.ReadIssues(
Expand Down

0 comments on commit fd2ded6

Please sign in to comment.