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

Document the clang-format flow in CONTRIBUTING.md #659

Open
wants to merge 3 commits into
base: unstable
Choose a base branch
from

Conversation

SoulPancake
Copy link

@SoulPancake SoulPancake commented Jun 17, 2024

Solves #649.

@SoulPancake SoulPancake force-pushed the ab/issue-649-document-clang-format-flow branch from 0cd3972 to 1a9dff4 Compare June 17, 2024 13:50
@SoulPancake
Copy link
Author

@PingXie Can you please take a look ^_^

CONTRIBUTING.md Outdated Show resolved Hide resolved
@enjoy-binbin enjoy-binbin changed the title [feat] document the clang-format flow Document the clang-format flow in CONTRIBUTING.md Jun 18, 2024
@enjoy-binbin enjoy-binbin linked an issue Jun 18, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.19%. Comparing base (5a51bf5) to head (855b2b9).
Report is 17 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #659      +/-   ##
============================================
+ Coverage     70.17%   70.19%   +0.01%     
============================================
  Files           110      110              
  Lines         60077    60078       +1     
============================================
+ Hits          42160    42171      +11     
+ Misses        17917    17907      -10     

see 14 files with indirect coverage changes

Copy link
Member

@PingXie PingXie left a comment

Choose a reason for hiding this comment

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

Thanks @SoulPancake!

CONTRIBUTING.md Outdated Show resolved Hide resolved
[Clang Format Check/clang-format-check] 🏁 Job succeeded
```
```

Copy link
Member

Choose a reason for hiding this comment

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

We should probably keep the DCO at the top as this is the most important information IMO for any new contributor. Also while you are at it, can you add some git commands to show how to add the DCO? I noticed that the commands were not obvious to some folks in the past.

SoulPancake and others added 2 commits June 18, 2024 10:56
@@ -19,6 +19,74 @@ The Valkey project is led by a Technical Steering Committee, whose responsibilit
* Want to help with documentation? [Move on to valkey-doc](https://github.com/valkey-io/valkey-doc)
* Report a vulnerability? See [SECURITY.md](SECURITY.md)

## How to Install clang-format 18 on a Debian Box
Copy link
Member

Choose a reason for hiding this comment

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

I don't really want to maintain an installation guide of clang-format for debian in this repository. Is there some better place we can point to? Do we need at least clang-format version 18 for this to run correctly?

Copy link
Member

Choose a reason for hiding this comment

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

yes 18 is the most compatible one. I think we can go higher but the installation becomes challenging.

What would you recommend for this documentation? Would it work we clarify this being debian specific (so we can extend it in the future to other platforms)?

Copy link
Member

Choose a reason for hiding this comment

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

I install clang-format version 14 on Ubuntu 22, it works fine. But I have no chance to older version, So we can say:

First run git clang-format, If you still meet an error, please upgrade your clang-format to latest version.


## How to Run clang-format-check Action Locally

1. Get [`act`](https://github.com/nektos/act).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
1. Get [`act`](https://github.com/nektos/act).
1. Install [`act`](https://nektosact.com/installation/index.html).

Comment on lines +37 to +40
2. Commit the changes locally:
```sh
git commit -a -s
```
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
2. Commit the changes locally:
```sh
git commit -a -s
```

Instead, I think you should indicate it runs on what is current committed locally.

@@ -19,6 +19,74 @@ The Valkey project is led by a Technical Steering Committee, whose responsibilit
* Want to help with documentation? [Move on to valkey-doc](https://github.com/valkey-io/valkey-doc)
* Report a vulnerability? See [SECURITY.md](SECURITY.md)

## How to Install clang-format 18 on a Debian Box
Copy link
Member

Choose a reason for hiding this comment

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

It would also be good to put this under a code format section, instead of a section for installing clang format. It would be nice to include an example for how to run it.

sudo act -j clang-format-check
```

### Here is a Failure Output
Copy link
Member

Choose a reason for hiding this comment

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

I think these two sections are overkill. The most useful part is the git diff part, so maybe just keep that? If there is no diff, then it will pass.

@SoulPancake
Copy link
Author

I was wondering if we can do something like the following for the installation steps
https://github.com/jdx/mise?tab=readme-ov-file#30-second-demo

@PingXie @madolson @enjoy-binbin @hwware
Would like to know your thoughts

@enjoy-binbin
Copy link
Member

The 30 second demo thing look cool, but i don't like this kind of fancy stuff on projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Document the clang-format flow
5 participants