ClangFormat version?

What version of ClangFormat does ArduinoIDE 2.3.2 use?

Ref: Customizing the Auto Formatter Feature

Could that detail be added to the above article?

Also, for macOS systems, by default if you try and create or save a file with a dot "." as the first character, you may get the notification "You can’t use a name that begins with a dot “.”, because these names are reserved for the system. Please choose another name."

If so, allow the Finder to show invisible files by typing "Cmd-Opt-." and then add the "." to the front of the file name. Click "Use Dot" when the dialog box " Are you sure you want to use a name that begins with a dot “.”?"

That note should be added as well to the article.

Why do you want to create a 'hidden file'?

As per the article, the clang-format file must start with a dot “.”

Isn't that also a problem on *nix systems (which MacOS is a member)

Based on Clang setup; where is .clang-format - #2 by ptillisch it's clang version 14.0.0. Verified against the current version (arduino-ide/arduino-ide-extension/package.json at main · arduino/arduino-ide · GitHub), it still is.

I can't help you with the "dot" as I'm not a Mac user.

@sonofcy
Linux (and I assume other *nix systems) happily allows you to create dot files; they are just hidden but not specifically system files.

1 Like

Hi @xylopyrographer.

Adding this sort of perishable information to the documentation often does more harm than good because it isn't really feasible to keep Arduino's documentation in sync with the software (software and documentation are the responsibility of two separate groups). It is better to omit some information than to include misinformation.

Thanks for your suggestion! You can submit a pull request to add it here:

https://github.com/arduino/docs-content/blob/main/content/software/ide-v2/tutorials/ide-v2-customize-auto-formatter/content.md

Information on contributing to the Arduino documentation here:

https://github.com/arduino/docs-content#how-can-i-contribute

Yep, same as Mac (which is a *nix system) hidden, but not system.

@ sterretje
Great tip on the clang version. Thanks!

No problem for me creating a file with a leading "dot". Was posting the comment as a recommendation to add to the docs for others. Though, if you're looking to modify the .clang-format file you probably already know this anyway.

I was thinking the same. Customization of the formatter is only intended to be done by advanced users as it is a complex procedure. The target user should already have a reasonable familiarity with working with their file system. Less advanced users should be satisfied with the default formatter configuration.

I do tend to prefer to provide comprehensive instructions when providing support here on Arduino Forum since I can tailor them to the requirements of the specific user I am supporting. However, when it comes to documentation the "TL;DR factor" is a bit more of a concern. Even more so when it will require branching the instructions according to which operating system the user has (since documentation must cover all operating systems rather than being tailored to the reader's specific system).