codereport / jsource

J Language Source Code. Livestream links ⬇️
https://www.youtube.com/playlist?list=PLVFrD1dmDdvfVhYLU_iKkV67X9XqCJLWe
Other
38 stars 20 forks source link

Clion shows warnings on invalid entries in the .clangformat file. #191

Closed Sebanisu closed 3 years ago

Sebanisu commented 3 years ago

It also shows valid values in tool tips. So I tried to update the .clangformat file based on what it showed me. I also changed the Cpp11 to c++17. i guess the Cpp11 is invalid.

https://clang.llvm.org/docs/ClangFormatStyleOptions.html

https://releases.llvm.org/10.0.0/tools/clang/docs/ReleaseNotes.html#clang-format Cpp11 was an older setting, it was depreciated in Clang 10

codereport commented 3 years ago

I need to look into this further. I think I am using ClangFormat8 locally (due to the fact that is was my work uses atm). This change causes:

YAML:14:32: error: invalid boolean
AllowShortBlocksOnASingleLine: Always
                               ^~~~~~
Error reading /home/cph/jsource/.clang-format: Invalid argument

So after I investigate, I will figure out the version (or maybe you can post which ClangFormat you are using) and we will pin and make this work.

Sebanisu commented 3 years ago

I am unsure of the version. I will look into it. I know it's not 12 as that has concept formatting but those options don't work. And when I reference the web I check what the lastest options are. I think Clion uses a built in clang format or it passes my code through wsl to what ever clang I have installed.

Sebanisu commented 3 years ago

https://intellij-support.jetbrains.com/hc/en-us/requests/3175227 I asked to confirm what Clion is doing.

Sebanisu commented 3 years ago

https://youtrack.jetbrains.com/issue/CPP-15236?_ga=2.71637907.1412804496.1615237872-452960068.1582761481&_gac=1.188701146.1612480318.Cj0KCQiA0-6ABhDMARIsAFVdQv9Y73d2crVY9HE7HwNf9YHJ53UEoT1oDBt7HWfTDcqG4lBEmLnvhWkaAt1EEALw_wcB

I'll just close this issue. Clion seems to use whichever version is built into the editor. There is an open issue to allow using of other versions.