-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[clang-tidy][NFC] Add .editorconfig for .rst files
#167269
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
base: main
Are you sure you want to change the base?
Conversation
clang-tools-extra/docs/.editorconfig
Outdated
| insert_final_newline = true | ||
| end_of_line = lf | ||
| indent_style = space | ||
| indent_size = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure whether this is necessary. The clang-tidy docs currently mix single- ,double-, triple-space indentation. (mainly in .. code-block:: and .. option::)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd personally want to have double-indentation everywhere but a lot of existing options are using triple- so we shouldn't enforce double- right now.
We could in the future after some extensive refactoring but I don't think it's a big priority.
clang-tools-extra/docs/.editorconfig
Outdated
| @@ -0,0 +1,8 @@ | |||
| [clang-tidy/checks/**/*.rst] | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this path, could we just place it in clang-tool-extra/docs/clang-tidy/checks/?
Will it work like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will work, I'll move it to that folder :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this path, could we just place it in
clang-tool-extra/docs/clang-tidy/checks/? Will it work like that?
Also, should we apply these checks to list.rst? The 80 chars limitation may require a lot of refactoring for this file.
Update: I currently disable long line check for this file and keep other checks active.
|
But what about C/C++/Python/CMake files? |
For C/C++ we have |
|
|
Hi, I've added a new |
|
We should gather opinions from other maintainers before pushing this. One could argue that 3rd party configs should not be pushed to repo. Because if we push editorconfig, why not .vscode config, .nvim, .idea and so on. |
Maybe open a RFC thread on the discourse forum? I'm not completely sure if continuing the discussion within the PR is ideal, since only clang-tidy reviewer are likely to see it. Also, LegalizeAdulthood gave an example of an existing WDYT? |
Sure, wider discussion will be helpful. We use project-wide Visual Studio Code config at work and I found it very useful. It goes beyond editor setting, but set up C++ extension (Clang-Format, Clang-Tidy), builds and debug. |
Add an
.editorconfigfile, this helps contributors’ editors auto‑apply these conventions and reduces regressions.This is part of the documentation improvement discussed in #167098