Closed Bug 1536839 Opened 6 years ago Closed 6 years ago

Add json output to ./mach clang-format

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement)

enhancement
Not set
normal

Tracking

(firefox68 fixed)

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: bastien, Assigned: bastien)

References

(Blocks 1 open bug)

Details

(Keywords: feature)

Attachments

(1 file)

The code review bot needs a JSON artifact with the issues found by the source-test-clang-format task.

I'd like to add a minimal Diff parser to ./mach clang-format in order to read the patch produced by clang-format and build an output such as:

{
  "path/to/test.cpp": [
    {
      "src_offset": 21,
      "dest_offset": 21,
      "src_length": 2,
      "dest_length": 3,
      "patch": "modified lines here..."
    }
  ]
}

Here is a real world example as a Taskcluster artifact.

Depends on D24193

Assignee: nobody → bastien
Status: NEW → ASSIGNED
Pushed by babadie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/02b78c6e3ca7 Add json formatter to ./mach clang-format, r=ahal,marco
Blocks: clang-format
Summary: Add json output to ./mach clnag-format → Add json output to ./mach clang-format
Severity: normal → enhancement
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: