[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 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•5 years ago
|
||
Oh, and if I try to solve it wrapping with ()
, it caused compile error...
Updated•5 years ago
|
Assignee | ||
Comment 2•5 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•5 years ago
|
||
Pushed by bpostelnicu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cd1779b622d4 inform the user who tries to use `mach static-analysis check ...` of when there are no files eligible for analysis. r=bastien
Comment 5•5 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•