Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

Sebanisu
Copy link
Collaborator

@Sebanisu Sebanisu commented Feb 26, 2021

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

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
@codereport
Copy link
Owner

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.

@codereport codereport added the ci / build This pertains to CI / build label Mar 5, 2021
@Sebanisu
Copy link
Collaborator Author

Sebanisu commented Mar 6, 2021

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
Copy link
Collaborator Author

Sebanisu commented Mar 8, 2021

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

@Sebanisu
Copy link
Collaborator Author

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.

@Sebanisu Sebanisu closed this Mar 10, 2021
@Sebanisu Sebanisu deleted the clang_format_update branch March 10, 2021 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci / build This pertains to CI / build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants