llvm/llvm-project

JavaScriptWrapImports:false doesn't work with ColumnLimit:0

Open

#52.935 aperta il 30 dic 2021

Vedi su GitHub
 (6 commenti) (0 reazioni) (0 assegnatari)C++ (10.782 fork)batch import
clang-formatgood first issuejavascript

Metriche repository

Star
 (26.378 star)
Metriche merge PR
 (Merge medio 1g 2h) (1000 PR mergiate in 30 g)

Descrizione

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";

Guida contributor