llvm/llvm-project

JavaScriptWrapImports:false doesn't work with ColumnLimit:0

Open

#52.935 aberto em 30 de dez. de 2021

Ver no GitHub
 (6 comments) (0 reactions) (0 assignees)C++ (10.782 forks)batch import
clang-formatgood first issuejavascript

Métricas do repositório

Stars
 (26.378 stars)
Métricas de merge de PR
 (Mesclagem média 1d 2h) (1.000 fundiu PRs em 30d)

Description

I've run into an issue when using ColumnLimit: 0. When JavaScriptWrapImports is false I'd expect clang-format to leave line breaks in import statements as they are in the original file. Instead, it seems that clang-format force-wraps them:

$ cat .clang-format 
Language: JavaScript
ColumnLimit: 0
JavaScriptWrapImports: false

$ cat testcase.js 
import {aaa, bbb, ccc} from "abc";

$ clang-format-mp-13 testcase.js
import {aaa,
        bbb,
        ccc} from "abc";

Guia do colaborador