etrian-dev / lrc-generator

A simple .lrc files generator to sync lyrics
MIT License
2 stars 1 forks source link

.clang-format is invalid #7

Open meator opened 1 year ago

meator commented 1 year ago

Hi. I'm on clang-format 15.0.7 and project's included .clang-format contains multiple errors. For example:

<builddir>/.clang-format:39:3: error: unexpected scalar
  Kind:            Always
  ^
<builddir>/.clang-format:39:3: error: invalid boolean
  Kind:            Always
  ^
Error reading <builddir>/.clang-format: Invalid argument
<builddir>/.clang-format:181:24: error: invalid boolean
SortUsingDeclarations: LexicographicNumeric
                       ^~~~~~~~~~~~~~~~~~~~
Error reading <builddir>/.clang-format: Invalid argument

Many of the error are probably caused by being to specific and specifying all flags in .clang-format. It is usually sufficient to only specify the style .clang-format is based on + options which deviate from the base style. I have used https://zed0.co.uk/clang-format-configurator/ which includes only necessary lines in .clang-format.

etrian-dev commented 1 year ago

I created it by dumping the LLVM style configuration to a file, which in hindsight might not be great, because I'm running clang-format 18 (git). I switched to a BasedOnStyle: LLVM to avoid these kind of mishaps.