This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] do not format MPEG transport streams.
ClosedPublic

Authored by mprobst on Jan 26 2017, 9:35 AM.

Details

Summary

The MPEG transport stream file format also uses ".ts" as its file extension.
This change detects its specific framing format (0x47 every 189 bytes) and
simply ignores MPEG TS files.

Diff Detail

Repository
rL LLVM

Event Timeline

mprobst created this revision.Jan 26 2017, 9:35 AM
djasper accepted this revision.Jan 26 2017, 9:49 AM
djasper added inline comments.
unittests/Format/FormatTestJS.cpp
1002 ↗(On Diff #85930)

nit: Should be MpegTS.

This revision is now accepted and ready to land.Jan 26 2017, 9:49 AM
mprobst updated this revision to Diff 85934.Jan 26 2017, 10:13 AM
  • Move MPEG check into Format.cpp.

PTAL, moved the check down a bit.

confused, wasn't this committed last year? is this an extra check?

confused, wasn't this committed last year? is this an extra check?

I think I fixed this in tslint, but not in clang-format. At least I cannot find a trace of it (but yeah, I thought I had fixed it, too).

This revision was automatically updated to reflect the committed changes.