[PATCH] D116638: [clang-format] Fix ignoring JavaScriptWrapImport when ColumnWidth: 0

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 5 09:13:48 PST 2022


MyDeveloperDay added a comment.

> Make JavaScriptWrapImports: true *always* wrap imports to multiple lines. This will be noisy and ugly.

Isn't this what `prettier` does when effectively the ColumnLimit is exceeded.

i.e.

  import { Controller, Get, Post, Req } from '@nestjs/common';

becomes as I hit the 80 column mark

  `
  import {
    Controller,
    Get,
    Post,
    Req,
    Request,
    Param,
    Query,
    StreamableFile,
    Body,
  } from '@nestjs/common';

So if ColumnLimit is 0 it should wrap them shouldn't it if `JavaScriptWrapImports: true`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116638/new/

https://reviews.llvm.org/D116638



More information about the cfe-commits mailing list