Skip to content

Update cc file tab settings - #65742

Merged
gregsfortytwo merged 2 commits into
ceph:mainfrom
edwinzrodriguez:ceph-clang-format-cc
Oct 8, 2025
Merged

gregsfortytwo merged 2 commits into
ceph:mainfrom
edwinzrodriguez:ceph-clang-format-cc

Conversation

@edwinzrodriguez

Copy link
Copy Markdown
Contributor

Update vim and emacs indent settings for cc 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 x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@@ -1,6 +1,6 @@
// -*- 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 -*-
//

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extraneous blank line?

Comment thread src/client/Fh.cc
@@ -1,6 +1,6 @@

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extraneous

@@ -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 -*-
#include "config_values.h"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add vim line?

Comment thread src/mgr/MgrOpRequest.cc
@@ -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 -*-

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vim line?

Comment thread src/msg/async/dpdk/ARP.cc
@@ -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 -*-

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vim line?

@@ -1,5 +1,5 @@
// -*- mode:C++; tab-width:8; c-basic-offset:2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not congruent with other files. Below, ft=cpp?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think vim will autodetect it - the filetype is mostly when your using a nonstandard extension or where it might be missing like a bash script

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Far enough. I don't use vim so I have little idea what this is about, but wanted to call out the difference in case it matters.

@@ -1,5 +1,5 @@
// -*- mode:C++; tab-width:8; c-basic-offset:2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not congruent with other files. Below, ft=cpp?

@@ -1,5 +1,5 @@
// -*- mode:C++; tab-width:8; c-basic-offset:2;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not congruent with other files. Below, ft=cpp?

Comment thread .clang-format Outdated

# The intended impact here is to allow up to 96 characters, but break at 80 if
# 96 is exceeded.
ColumnLimit: 80

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay!

Comment thread CodingStyle Outdated
Indent width is two spaces. When runs of 8 spaces can be compressed
to a single tab character, do so. The standard Emacs/Vim settings
header is:
Indent width is two spaces. Tabs are expanded to spaces.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you.

@edwinzrodriguez edwinzrodriguez mentioned this pull request Oct 1, 2025
4 of 14 tasks

@idryomov idryomov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop "Update CodingStyle to specify use of spaces" and "Add .clang-format configuration file" commits from this PR. I'd expect CodingStyle update to go in via #65741 and .clang-format settings can continue to be discussed in #65049.

@edwinzrodriguez edwinzrodriguez mentioned this pull request Oct 1, 2025
4 of 14 tasks
@idryomov idryomov mentioned this pull request Oct 1, 2025
4 of 14 tasks
@edwinzrodriguez
edwinzrodriguez force-pushed the ceph-clang-format-cc branch 2 times, most recently from 45111a9 to 3f34841 Compare October 1, 2025 16:47
@edwinzrodriguez

Copy link
Copy Markdown
Contributor Author

I went back and unbased each change so no more duplication of .clang-format and CodingStyle

@edwinzrodriguez

Copy link
Copy Markdown
Contributor Author

Is there a way to avoid the problem with 'Check for Incompatible License' failure?

@edwinzrodriguez

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@edwinzrodriguez

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@edwinzrodriguez

Copy link
Copy Markdown
Contributor Author

jenkins test make check

1 similar comment
@edwinzrodriguez

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@edwinzrodriguez

Copy link
Copy Markdown
Contributor Author

I added missing blank lines where needed after the editor block

@gregsfortytwo gregsfortytwo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pulled this PR down and spot-checked emacs' behavior it in src/ceph/src/cls/rbd/cls_rbd.cc, and it had the expected impact on editing. LGTM!

@edwinzrodriguez

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

1 similar comment
@edwinzrodriguez

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@gregsfortytwo
gregsfortytwo merged commit 393381b into ceph:main Oct 8, 2025
@github-actions

github-actions Bot commented Oct 8, 2025

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I found one or more Fixes: tags in the commit messages in

git log 393381b5730ecc1cfa6628f64e08ac7244a4f745^..393381b5730ecc1cfa6628f64e08ac7244a4f745

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 Log: https://github.com/ceph/ceph/actions/runs/18360563270

@edwinzrodriguez
edwinzrodriguez deleted the ceph-clang-format-cc branch October 10, 2025 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants