Closed Bug 1544208 Opened 5 years ago Closed 5 years ago

[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)

defect
Not set
normal

Tracking

(firefox68 fixed)

RESOLVED FIXED
mozilla68
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.

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

Assignee: nobody → bpostelnicu

: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.

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
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
See Also: → 1600588
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: