Repository navigation
Update header file tab settings - #65741
Conversation
This is a first for me! |
anthonyeleven
left a comment
There was a problem hiding this comment.
I usually wouldn't approve a code PR, but as this doesn't change actual code I think it's legit for me to do so.
nits: Multiple files where either the vim or the gnumacs lines are missing. Multiple files where there isn't a blank line after the editor config lines: most files have a blank line, so that seems to be the desired pattern. One instance of a leading blank line.
|
|
||
| # The intended impact here is to allow up to 96 characters, but break at 80 if | ||
| # 96 is exceeded. | ||
| ColumnLimit: 80 |
There was a problem hiding this comment.
THANK YOU THANK YOU THANK YOU
|
|
||
| # Do not align trailing comments across multiple lines. Note that this only applies | ||
| # to the single-line comment style using "//". Block inlines are always left alone. | ||
| AlignTrailingComments: false |
| @@ -1,4 +1,4 @@ | |||
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | |||
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- | |||
There was a problem hiding this comment.
I think this probably should have
// vim: ts=8 sw=2 expandtab added to match the other files.
Though of course any emacs >> any vi ;)
| @@ -1,4 +1,4 @@ | |||
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | |||
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- | |||
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | ||
| // vim: ts=8 sw=2 smarttab | ||
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- | ||
| // vim: ts=8 sw=2 expandtab | ||
| #ifndef CEPH_CLS_LOG_TYPES_H |
| @@ -1,6 +1,6 @@ | |||
|
|
|||
There was a problem hiding this comment.
For conformity this blank line should probably be removed unless it's part of the spell.
There was a problem hiding this comment.
Given this was supposed to be a straight mechanical change to the editor settings from being out of sync with .clang_format, I don't want to require blank line fixes or too much else on top of it.
There was a problem hiding this comment.
Re blank lines, fair enough. There are a number of files with missing lines, though, which would seem to be congruent with the goal. I also am unsure that the editor config is interpreted for files with an initial blank line.
| @@ -1,4 +1,4 @@ | |||
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | |||
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- | |||
| @@ -1,4 +1,4 @@ | |||
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | |||
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- | |||
| @@ -1,4 +1,4 @@ | |||
| // vim: ts=8 sw=2 smarttab | |||
| // vim: ts=8 sw=2 expandtab | |||
There was a problem hiding this comment.
Add emacs line please.
| to a single tab character, do so. The standard Emacs/Vim settings | ||
| header is: | ||
| Indent width is two spaces. Tabs are expanded to spaces. | ||
| The standard Emacs/Vim settings header is: |
There was a problem hiding this comment.
Thank you. Tabs arguably are a relic of the typewriter days and storage is no longer so expensive that it's worth the hassle of tabification, especially when e.g. Ansible doesn't like them.
There was a problem hiding this comment.
Yes, for viewing changes in github is the fundamental motivator here and other tools that balk at the mixed tab/space layout
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | ||
| // vim: ts=8 sw=2 smarttab | ||
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- | ||
| // vim: ts=8 sw=2 expandtab |
There was a problem hiding this comment.
Why do some of these lines have ft=cpp but not others?
There was a problem hiding this comment.
Probably copy/paste oops
There was a problem hiding this comment.
Ack. I dont' know if it's important but I note for due diligence. Did you edit each file, or use a find/sed/awk loop?
|
This change was simply grep/sed replacement across files and was not intended to fix any other issues - the change is large enough already :) |
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- | ||
| // vim: ts=8 sw=2 smarttab ft=cpp | ||
| // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- | ||
| // vim: ts=8 sw=2 sts=2 expandtab ft=cpp |
There was a problem hiding this comment.
sts=2 isn't being added in the actual header file updates in the rest of the PR. Should it be dropped here?
There was a problem hiding this comment.
Good point. I'll update the changes to add sts=2 to the modified header comments. The sts setting is needed to indent by 2 when using the tab key
43bc50f to
a32bf71
Compare
a32bf71 to
6f2211f
Compare
|
jenkins test make check arm64 |
1 similar comment
|
jenkins test make check arm64 |
|
I added missing blank lines where needed after the editor block |
Signed-off-by: Edwin Rodriguez <[email protected]>
Fixes: https://tracker.ceph.com/issues/72587 Signed-off-by: Edwin Rodriguez <[email protected]>
Signed-off-by: Edwin Rodriguez <[email protected]>
8c27c4f to
4adaf64
Compare
|
jenkins test make check arm64 |
1 similar comment
|
jenkins test make check arm64 |
There's unfortunately not a way to have Github chain PRs, although I believe it will resolve sensibly — if you merged #65049, those patches would no longer show up in this PR as new additions. |
gregsfortytwo
left a comment
There was a problem hiding this comment.
The config line change LGTM.
|
This is an automated message by src/script/redmine-upkeep.py. I found one or more
The referenced tickets are: Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them. |
Update vim and emacs indent settings in header files
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.