llvm/llvm-project

JavaScriptWrapImports:false doesn't work with ColumnLimit:0

Open

#52,935 建立於 2021年12月30日

在 GitHub 查看
 (6 留言) (0 反應) (0 負責人)C++ (10,782 fork)batch import
clang-formatgood first issuejavascript

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

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

貢獻者指南