-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace calls to .Any() with .Count is not 0. #37
Conversation
de5eb2b
to
c1e9407
Compare
Signed-off-by: AraHaan <[email protected]>
c1e9407
to
23d615b
Compare
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
3 similar comments
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits
@@ -15,8 +15,8 @@ public override string ToString() | |||
var sb = new StringBuilder($"Namespace: Name: {this.Namespace}"); | |||
foreach (var classItems in this.Classes) | |||
{ | |||
sb.AppendLine(); | |||
sb.Append($"Class Item {this.Classes.IndexOf(classItems)}: {classItems}"); | |||
_ = sb.AppendLine(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not too sure if applying this pattern is healthy
@@ -28,7 +25,7 @@ public void Process(INamedTypeSymbol testClass, CancellationToken ct) | |||
var classItemsQuery = | |||
from att in testClass.GetAttributes() | |||
where att.AttributeClass!.Name.Equals( | |||
"GenerateDisposeAttribute") | |||
"GenerateDisposeAttribute", StringComparison.Ordinal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use nameof(GenerateDisposeAttribute)
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like that very much however the attribute code files does not get directly compiled to be a part of the generator assembly, instead it gets provided as basically an output from the generator itself. I guess a workaround is to reference the generator and having it run here and then use nameof(GenerateDisposeAttribute)
though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's included in the generated output files, it's fine. I don't find a reason to change how the API for the generator is accessible to the user.
Signed-off-by: AraHaan <[email protected]>
8a7a557
to
6c156db
Compare
This pull request is about to be automerged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automatically approving since automerge label was found.
Checklist
Describe the issue this fixes / feature this adds
Fixes #36.