Closed Bug 1671224 Opened 4 years ago Closed 4 years ago

`static-analysis check --outgoing` is broken on Windows

Categories

(Developer Infrastructure :: Source Code Analysis, defect, P1)

x86_64
Windows 10

Tracking

(firefox84 fixed)

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: saschanaz, Assigned: andi)

References

Details

Attachments

(1 file)

It's using os.path.abspath to get absolute path for the outgoing files and then checking them against compile_db where all paths are using forward slashes.

Since os.path.abspath generates backward slashes, this is incorrect and thus the command throws:

The source list generated from get_outgoing_files:

['dom/base/Selection.cpp', 'dom/base/Selection.h', 'editor/libeditor/EditorBase.cpp', 'editor/libeditor/EditorBase.h', 'editor/libeditor/HTMLEditSubActionHandler.cpp', 'editor/libeditor/HTMLEditor.cpp', 'editor/libeditor/HTMLEditor.h', 'editor/libeditor/HTMLEditorDataTransfer.cpp', 'editor/libeditor/TextEditSubActionHandler.cpp', 'editor/libeditor/TextEditor.cpp', 'editor/libeditor/TextEditorDataTransfer.cpp', 'editor/nsIEditor.idl', 'xpcom/idl-parser/xpidl/header.py', 'xpcom/idl-parser/xpidl/xpidl.py']

Converted results:

['c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\dom\\base\\Selection.cpp', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\dom\\base\\Selection.h', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\editor\\libeditor\\EditorBase.cpp', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\editor\\libeditor\\EditorBase.h', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\editor\\libeditor\\HTMLEditSubActionHandler.cpp', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\editor\\libeditor\\HTMLEditor.cpp', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\editor\\libeditor\\HTMLEditor.h', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\editor\\libeditor\\HTMLEditorDataTransfer.cpp', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\editor\\libeditor\\TextEditSubActionHandler.cpp', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\editor\\libeditor\\TextEditor.cpp', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\editor\\libeditor\\TextEditorDataTransfer.cpp', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\editor\\nsIEditor.idl', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\xpcom\\idl-parser\\xpidl\\header.py', 'c:\\Users\\Kagami\\Documents\\GitHub\\gecko-dev\\xpcom\\idl-parser\\xpidl\\xpidl.py']

Consequent mach output (I'm not sure why it shows twice):

 0:07.13 There are no files eligible for analysis. Please note that 'header' files cannot be used for analysis since they do not consist compilation units.
 0:07.13 There are no files eligible for analysis. Please note that 'header' files cannot be used for analysis since they do not consist compilation units.
Priority: -- → P1
Assignee: nobody → bpostelnicu

Could you please test this and tell me if it solves your issue? I don't have a windows machine.

Flags: needinfo?(krosylight)

It works 👍

Flags: needinfo?(krosylight)
Pushed by bpostelnicu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/87fe9b540431
make `static-analysis check --outgoing` cross-platform. r=sylvestre
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
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: