Skip to content

Let's (try to) make Coverity's job easier #1090

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

Merged
merged 5 commits into from
Jun 11, 2015
Merged

Let's (try to) make Coverity's job easier #1090

merged 5 commits into from
Jun 11, 2015

Conversation

nulltoken
Copy link
Member

I've started to review Coverity findings. Some on them were raised because Coverity was unable to properly decipher Ensure.GitObjectIsNotNull() logic.

I've started to manually triage them as mark as False Positives.

Then, I eventually rollbacked my work and decided to simplify the code flow.

This PR also contains some minor fixes that I discovered while working on this.

@nulltoken
Copy link
Member Author

Tweaked AppVeyor settings to schedule a daily run of Coverity analysis until all the issues are resolved.

@nulltoken
Copy link
Member Author

/cc @whoisj

exceptionBuilder = m => new UnbornBranchException(m);
}
else
if (gitObject != null)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been meaning to ask about this: is checking null all that needs to be done here or should some SafeHandle or IntPtr be checked as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please open an issue about this?

@whoisj
Copy link

whoisj commented Jun 11, 2015

Generally 👍 as I'm a huge fan of simplicity. Only left a single comment, but action should be in a separate PR and not this one.

nulltoken added a commit that referenced this pull request Jun 11, 2015
Let's (try to) make Coverity's job easier
@nulltoken nulltoken merged commit 1359cc5 into vNext Jun 11, 2015
@nulltoken nulltoken deleted the ntk/coverity branch June 11, 2015 15:49
@nulltoken nulltoken added this to the v0.22 milestone Jun 11, 2015
@nulltoken
Copy link
Member Author

😿 That didn't help. Coverity results show that the analyzer didn't properly caught that a null GitObject could never be dereferenced once checked through Ensure.GitObjectIsNotNull().

I eventually had to tag some of the findings as false positives.

/cc @dakshesh-coverity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants