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

Changed 'No' to 'false' in .clang-format #141

Merged
merged 1 commit into from Oct 9, 2021

Conversation

giacomo-b
Copy link
Contributor

Having 'No' inside .clang-format gives me the following error (Ubuntu 18.04):

YAML:6:36: error: invalid boolean
    AlwaysBreakTemplateDeclarations: 'No'
                                     ^~~~
  Error reading /home/my_path/ProjectName/.clang-format: Invalid argument

'false' fixes it.

@ClausKlein
Copy link
Contributor

AlwaysBreakTemplateDeclarations

Which version of clang-tidy are you using?

For current version clang-tidy No is correct!

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

Copy link
Owner

@TheLartians TheLartians left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks for the PR! I agree that 'false' is also better for consistency as we are using for the other flags as well.

@TheLartians TheLartians merged commit d07c18e into TheLartians:master Oct 9, 2021
@ClausKlein
Copy link
Contributor

Hey thanks for the PR! I agree that 'false' is also better for consistency as we are using for the other flags as well.

@TheLartians
I can not understand the agreement?
AlwaysBreakTemplateDeclarations is not a Boolean value!

@TheLartians
Copy link
Owner

TheLartians commented Oct 17, 2021

@ClausKlein good point, I should've checked the documentation before... Thanks for the note!
@giacomo-b according to the docs, it turns out that No is indeed correct here, as it's not a boolean value. I was previously under the assumption that both should be equivalent. Could you try to updating clang-format to a recent version (e.g. 12.0.0) and see if the error persists?

@giacomo-b
Copy link
Contributor Author

@TheLartians sorry for the delay, I've been extremely busy. You're probably right and the problem comes from the version, I am running 6.0.0 on Ubuntu 18.04. Sorry about this.

@giacomo-b
Copy link
Contributor Author

Update: I recently had the chance to install clang-format-10 and everything is working as expected with 'No'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants