https://bugs.llvm.org/show_bug.cgi?id=51101

            Bug ID: 51101
           Summary: .editorconfig
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: nn1436...@gmail.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org

.editorconfig ( https://editorconfig.org/ ) is the standard way to define code
formatting and analysis rules.

The main advantage of editorconfig file is filtering options which are
unavailable in Clang Format YAML.

The conversion from YAML to editorconfig can be done straight-forward, for
example:

.clang-format

Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align


.editorconfig

[*.cpp]
clang_format_cpp_access_modifier_offset = -4
clang_format_cpp_align_after_open_bracket = align

# Can specify different rule for a different filter
[tests/*.cpp]
clang_format_cpp_access_modifier_offset = 8

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to