Proposing changes to clang-tools-extra/docs/clang-tidy/index.rst
'Using clang-tidy' was split into 2 chapters:
- 'Standalone tool' (the previous content of 'Using clang-tidy')
- 'Clang-tidy integrated' (a new chapter)
Paths
| Differential D54945
This commit adds a chapter about clang-tidy integrations ClosedPublic Authored by MarinaKalashina on Nov 27 2018, 4:14 AM.
Details
Summary Proposing changes to clang-tools-extra/docs/clang-tidy/index.rst 'Using clang-tidy' was split into 2 chapters:
Diff Detail Event TimelineComment Actions I like the overview, maybe a link to clangd here might help, as there is currently a lot of effort of integrating clang-tidy into it. (@sammccall WDYT?)
Comment Actions
This would be great! The integration is not yet complete, so I'm not sure if it's best to add now or later. For the table:
The behavior today is that three hard-coded checks are always enabled, as a proof-of-concept. Configuration via .clang-tidy is the main missing piece. Eugene.Zelenko added inline comments. Comment Actions Fixes:
Additions:
Comment Actions
Did you forget to add a new file to the patch? Please also include full context into the diff. See https://llvm.org/docs/Phabricator.html Comment Actions
Sorry but the new diff was included to the patch.. I can see the updates as Diff 176328. Could you please check and let me know if it does not work? Thank you. Comment Actions
Please see the screenshot. The diff might be reversed (new vs. old) or just wrong. And there's no context (not overly important in this particular patch, but still makes it more convenient to review). Comment Actions @alexfh Thanks a lot for your patience and help. I've made another revision, now with the diff made by 'git show HEAD -U999999' to have the full context availlable. Comment Actions
I don't know how this happened, but the diff is still almost empty. This is what I get when I click on the "Download raw diff": Index: docs/clang-tidy/index.rst =================================================================== --- docs/clang-tidy/index.rst +++ docs/clang-tidy/index.rst @@ -403,7 +403,7 @@ // Silent only the specified diagnostics for the next line // NOLINTNEXTLINE(google-explicit-constructor, google-runtime-int) - Foo(bool param); + Foo(bool param); }; The formal syntax of ``NOLINT``/``NOLINTNEXTLINE`` is the following: It's definitely not a common problem, since there are other patches in review, which are displayed just fine. Comment Actions
A correction: it's now empty (and it was broken in a different way last time). Could you verify that you're correctly following one of the processed described in the documentation (https://llvm.org/docs/Phabricator.html)? It looks like you're uploading only one commit from the whole branch. Comment Actions Maybe try to use Arcanist for uploading diffs? Comment Actions Another attempt to update the patch with the following fixes:
Comment Actions Thanks for the update! We still need to solve the technicality here: could you please upload the diff with full context? See LLVM docs for an example on how this can be done with various version controls (the -U99999 args are important, they are the ones that produce diffs with enough lines around it) Comment Actions @ilya-biryukov Thank you for a quick response and sorry for so many iterations. I uploaded a full-context version; hopefully this time it's alright - on my side, it finally looks like a proper full-context diff.
Comment Actions @alexfh Just for me to be sure, should there be the following structure in http://clang.llvm.org/extra/index.html: The list of clang-tidy checks Using clang-tidy Suppressing Undesired Diagnostics Clang-tidy Integrated (separate page) Getting Involved (separate page) And should the latter two pages be linked from 'Clang-Tidy' index.rs like 'The list of clang-tidy checks', which is placed in 'See also'?
Comment Actions
Roughly like that. More specifically, I'd suggest to modify the See also section of clang-tidy/index.rst as follows: See also: .. toctree:: :maxdepth: 1 The list of clang-tidy checks <checks/list> Clang-tidy IDE/Editor Integrations <integrations> Getting Involved <contribution> The order of TOC items in http://clang.llvm.org/extra/index.html will be slightly weird (the three external docs will be placed before the headings of the main document), but that doesn't seem like a huge problem (and may be fixable). Comment Actions Extracting 'Getting Involved' and 'Clang-tidy integrations' to separate pages linked in See Also. Comment Actions @alexfh Thank you, please see the updated structure.
This revision is now accepted and ready to land.Jan 11 2019, 2:50 PM Comment Actions I would suggest to rename contribution to Contributing (see LLVM documentation) and integrations to Integrations. Will be also good idea to fix D55523 script warnings. MarinaKalashina marked an inline comment as done. Comment Actionsfiles renamed: contribution.rst to Contributing.rst, integrations.rst to Integrations.rst Comment Actions
Sure, done.
The script warns about double spaces and line width in the table, for example: warning: line 39 contains double spaces warning: line 39 is in excess of 80 characters (196) These spaces and width are intended since they 'draw' the table layout. Do you think we could ignore such warnings in this particular case? Comment Actions
Sure, it's fine to leave table as it is. Same thing is done in LLDB code where tables are excluded from Clang-format. Comment Actions @Eugene.Zelenko @alexfh Thank you! How should I proceed with the revision now? Do I get it right from https://llvm.org/docs/Phabricator.html#committing-a-change, that without commit access, I need to ask for committing the changes for me? Closed by commit rL351463: [Documentation] Add a chapter about Clang-tidy integrations. (authored by eugenezelenko). · Explain WhyJan 17 2019, 10:36 AM This revision was automatically updated to reflect the committed changes. Comment Actions clang-tools-sphinx-docs bot is failing because of: Warning, treated as error: Frankly I don't know what is proper way to handle cross-module documentation links. Comment Actions By the word, I noticed that HTTP was used and replaced it with HTTPS in Contributing.rst. Will be good idea to do the same in other documentation.
Revision Contents
Diff 181528 docs/clang-tidy/Contributing.rst
docs/clang-tidy/Integrations.rst
docs/clang-tidy/index.rst
|
I think a blank line here would not hurt.