[Automated review] Pointed a thing in .h file, but cannot check it with `./mach static-analysis check <path/to/file.h>`

RESOLVED FIXED in Firefox 68

Status

defect
RESOLVED FIXED
a month ago
27 days ago

People

(Reporter: masayuki, Assigned: andi)

Tracking

Trunk
mozilla68

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

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.

Oh, and if I try to solve it wrapping with (), it caused compile error...

Assignee: nobody → bpostelnicu
Assignee

Comment 2

a month 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.

Comment 4

28 days 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

27 days ago
bugherder
Status: NEW → RESOLVED
Last Resolved: 27 days ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.