ament / ament/ament_lint

[ament_clang_format] Support pointing to config file rather than YAML load/dump for clang-format>=14.0.0

Offen
#383 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
help wanted
Vorherrschende Sprache
Python
Sterne
50
Forks
129
Ø Merge
3 T. 10 Std.
Gemergte PRs (30 T.)
3

Beschreibung

### What?

From the [clang-format v14.0.0 changelog](https://releases.llvm.org/14.0.0/tools/clang/docs/ReleaseNotes.html#clang-format):

> The command line argument `-style=` has been extended so that a specific format file at location `` can be selected. This is supported via the syntax: `-style=file:`.

Given that the default clang-format version in Ubuntu 22.04 is [>=14~](https://packages.ubuntu.com/jammy/clang-format), it's reasonable to expect that the configuration file argument will just be passed as a file path to the invoked clang-format binary (for appropriate versions) rather than as a dumped YAML stream.

### Why?

The main use-case for this feature request is to handle cases like #364, where multiple configurations for different languages mean that there are multiple YAML documents in the same file. The YAML load API does not like this, even though this is a perfectly fine use of the clang-format configuration.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.