[Automated review] Pointed a thing in .h file, but cannot check it with `./mach static-analysis check <path/to/file.h>`
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Tracking
(firefox68 fixed)
| Tracking | Status | |
|---|---|---|
| firefox68 | --- | fixed |
People
(Reporter: masayuki, Assigned: andi)
References
Details
Attachments
(1 external file)
https://phabricator.services.mozilla.com/D27406
As specified, I tried to check the header file with ./mach static-analysis check editor/libeditor/EditorCommands.h on Windows. However, the result does not show any error even without any errors.
| Reporter | ||
Comment 1•7 years ago
|
||
Oh, and if I try to solve it wrapping with (), it caused compile error...
Updated•7 years ago
|
| Assignee | ||
Comment 2•7 years ago
•
|
||
:masayuki we cannot check header files since they are not a stand alone compilation unit. Let's say we have this example:
file.cpp
#include <file.h>
void foo() {...}
If you want to check the cpp file and it's associated compilation unit you can do: ./mach static-analysis check file.cpp file.h
Now focusing on the example provided by the review bot you can simulate it's beahviour like:
mach static-analysis check layout/build/nsLayoutStatics.cpp editor/libeditor/EditorController.h editor/libeditor/EditorController.cpp editor/libeditor/EditorCommands.h editor/libeditor/EditorCommands.cpp
One more thing though, out review-time static-analysis in ran on linux64, in general there shouldn't be differences between windows and linux except for specific #ifdefs.
| Assignee | ||
Comment 3•7 years ago
|
||
Comment 5•7 years ago
|
||
| bugherder | ||
Updated•4 years ago
|
Description
•