[all-commits] [llvm/llvm-project] 9835cf: clang-format: [JS] pragmas for tslint, tsc.

Martin Probst via All-commits all-commits at lists.llvm.org
Fri Jan 17 04:39:13 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9835cf159014f40e8ea655d0bb3a341ef7ec34f7
      https://github.com/llvm/llvm-project/commit/9835cf159014f40e8ea655d0bb3a341ef7ec34f7
  Author: Martin Probst <martin at probst.io>
  Date:   2020-01-17 (Fri, 17 Jan 2020)

  Changed paths:
    M clang/lib/Format/Format.cpp
    M clang/unittests/Format/FormatTestJS.cpp

  Log Message:
  -----------
  clang-format: [JS] pragmas for tslint, tsc.

Summary:
tslint and tsc (the TypeScript compiler itself) use comment pragmas of
the style:

  // tslint:disable-next-line:foo
  // @ts-ignore

These must not be wrapped and must stay on their own line, in isolation.
For tslint, this required adding it to the pragma regexp. The comments
starting with `@` are already left alone, but this change adds test
coverage for them.

Reviewers: krasimir

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72907




More information about the All-commits mailing list