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

Format document (clang-format) does not work if fallbackStyle="" is defined in settings.json #10994

Closed
illegal-instruction opened this issue May 23, 2023 · 4 comments
Assignees
Labels
bug Feature: Code Formatting fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Milestone

Comments

@illegal-instruction
Copy link

Type: Bug

Reproduce the issue with the UI settings.
1 - I modified the C_Cpp.clang_format_fallbackStyle setting using the UI to 'LLVM'.
2 - The modified it to ''

VSCode throws a 'formatting failed error' when settings.json looks like this
{
"C_Cpp.clang_format_fallbackStyle": "",
"files.associations": {
"*.tcc": "cpp"
}
}

However, deleting the line fixes it, and formatting is done without errors (since I have the 'file' value in format style and a valid .clang-format file)
{
"files.associations": {
"*.tcc": "cpp"
}
}

Might this be considered an inconsistent behavior?

@sean-mcmanus
Copy link
Collaborator

Thanks for reporting this. It also repros with clang_format_style.

@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Jun 1, 2023
@michelleangela
Copy link
Contributor

Fixed in pre-release 1.16.1 https://github.com/microsoft/vscode-cpptools/releases/tag/v1.16.1.

@michelleangela
Copy link
Contributor

Fix is now available in release version 1.16.2.

@illegal-instruction
Copy link
Author

Thank you @sean-mcmanus !

@github-actions github-actions bot locked and limited conversation to collaborators Aug 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Code Formatting fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Projects
None yet
Development

No branches or pull requests

3 participants