-
Notifications
You must be signed in to change notification settings - Fork 44
Addressing SonarCloud suggestions #603
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
Conversation
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.
There are a lot of comments throughout the code, where 'TODO' has been stripped from the comment, but there's no apparent related code change. I don't know how to interpret these. Did the TODO get implemented in these cases?
Related to that, the Dispose
pattern that is implemented several times in the code seems to have a mismatch in meaning between the comments and the code. It was also odd to see a lint error suppression ("S1066:Collapsible "if" statements should be merged") in only one of those cases, and none of the others. Is that lint suppression really needed?
// TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. | ||
// TODO: set large fields to null. | ||
// free unmanaged resources (unmanaged objects) and override a finalizer below. | ||
// set large fields to null. |
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.
Same here as above. Is this supposed to be a TODO, or is the thing in the comment already implemented now?
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.
this was already addressed by my comment/reply above...
@waltjones , I addressed all of it in the other code-spot-specific comments that you made. Let me know if I missed anything... |
@akornich Thanks for the follow up. The changes in the TODO comments look like something that will come back to haunt later. The resulting comments seem misleading. |
@waltjones, what do you mean by "haunt later"? These are modified code comments that still have the same directions to follow when/if applicable but do not disturb the SonarrCloud analyzer long-term if never needed to implement in each specific case. Also, what is exactly so misleading about?:
If a class does not use unmanaged resources, there is nothing to free following the first direction. |
If the comments don't apply to the code, they should be removed completely. If they are a todo that should be implemented later, they should say that clearly in some way. Maybe send the diff to some other people and see what feedback you get. |
@waltjones , thanks again for the diligent review! |
Description of the change
Type of change
Related issues
Checklists
Development
Code review