This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] recognize .ts and .json in git-clang-format.
ClosedPublic

Authored by mprobst on Jun 18 2015, 9:59 AM.

Details

Reviewers
djasper

Diff Detail

Event Timeline

mprobst updated this revision to Diff 27944.Jun 18 2015, 9:59 AM
mprobst retitled this revision from to clang-format: [JS] recognize .ts and .json in git-clang-format..
mprobst updated this object.
mprobst edited the test plan for this revision. (Show Details)
mprobst added a reviewer: djasper.
mprobst added a subscriber: Unknown Object (MLST).
djasper accepted this revision.Jun 19 2015, 1:27 AM
djasper edited edge metadata.

Submitted just the .ts part in r240128.

tools/clang-format/git-clang-format
80

We don't properly support plain json files yet, AFAICT. Shouldn't be much of a change, but that should be separate.

Also, if we add it, it should be in sync with clang-format-diff.py and getLanguageByFileName().

This revision is now accepted and ready to land.Jun 19 2015, 1:27 AM
djasper closed this revision.Jun 19 2015, 1:27 AM

You can run clang-format over JSON with -assume-filename=a.js, the result is ok-ish. But ack, people also might not want to be fancy in their JSON formatting and prefer a more regular +2 indent style.