Skip to content
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

apply updated code style #1196

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Conversation

apolyakov
Copy link
Contributor

No description provided.

@apolyakov apolyakov added the refactoring Logic and code style improvements label Dec 20, 2024
@apolyakov apolyakov added this to the next milestone Dec 20, 2024
@apolyakov apolyakov self-assigned this Dec 20, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

after squash, there will be another sha commit. .git-blame-ignore-revs should be added after the merge of this MR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's added here so you can test it and make sure that git blame continues working

@@ -3,12 +3,12 @@
#include "common/smart_ptrs/intrusive_ptr.h"

#ifndef INCLUDED_FROM_KPHP_CORE
#error "this file must be included only from runtime-core.h"
#error "this file must be included only from runtime-core.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

don't want to enable `IndentPPDirectives'?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for macro indentation

AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should keep it?

ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd keep it. IMHO

Copy link
Contributor

Choose a reason for hiding this comment

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

Includes are sorted implicitly by setting base variant on LLVM, I suppose.

IncludeCategories:
- Regex: '^<'
Priority: 1
IndentCaseLabels: true
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should keep it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Mb will we add the formatting script first, and then the new rules?

@@ -3,12 +3,12 @@
#include "common/smart_ptrs/intrusive_ptr.h"

#ifndef INCLUDED_FROM_KPHP_CORE
#error "this file must be included only from runtime-core.h"
#error "this file must be included only from runtime-core.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for macro indentation

ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Includes are sorted implicitly by setting base variant on LLVM, I suppose.

@apolyakov apolyakov force-pushed the apolyakov/update-clang-format branch from 3736a14 to 6fcdf6f Compare February 4, 2025 10:44
@apolyakov apolyakov force-pushed the apolyakov/update-clang-format branch 2 times, most recently from 3418219 to fa623c6 Compare February 4, 2025 14:03
@apolyakov apolyakov force-pushed the apolyakov/update-clang-format branch from fa623c6 to e2ff8dc Compare February 4, 2025 14:08

- name: Check for formatting changes
run: |
# Check if any files were modified by clang-format
Copy link
Contributor

Choose a reason for hiding this comment

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

why not git diff --exit-code?

@apolyakov apolyakov force-pushed the apolyakov/update-clang-format branch from 03adca9 to d113357 Compare February 4, 2025 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Logic and code style improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants