[SERVER-57428] Coverity analysis defect 120147: Parse warning Created: 03/Jun/21 Updated: 08/Jun/21 Resolved: 08/Jun/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Coverity Collector User | Assignee: | Samyukta Lanka |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | coverity | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Sprint: | Repl 2021-06-14 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Parse warning A parse warning may reduce maintainability of the code, or it may indicate a serious error. A parse warning from the Coverity parser may indicate a bug, or poor coding practice |
| Comments |
| Comment by Samyukta Lanka [ 08/Jun/21 ] | |
|
This was fixed as a part of | |
| Comment by Andrew Morrow (Inactive) [ 04/Jun/21 ] | |
|
I've filed | |
| Comment by Andrew Morrow (Inactive) [ 04/Jun/21 ] | |
|
Actually, the issue is right there in front of us. From that log you linked:
We need to be running with something like --header-filter=mongo/.* in order to get clang-tidy reports for code in headers. | |
| Comment by Benety Goh [ 04/Jun/21 ] | |
|
The most recent clang-tidy run mentioned the .cpp file but not the header. Maybe this is the issue? We extract the source files for clang-tidy to process from the scons-generated compile_commands.json build artifact.
| |
| Comment by Benety Goh [ 04/Jun/21 ] | |
|
The function that Coverity flagged was added in | |
| Comment by Andrew Morrow (Inactive) [ 04/Jun/21 ] | |
|
benety.goh - I thought we had enabled the clang-tidy check for this with readability-const-return-type. Any idea why it didn't catch this instance? |