Add clang-format #178

Open
achuprov wants to merge 4 commits from achuprov/xk6-frostfs:feat/add_clag_format into master
Member

Close #164
Signed-off-by: Alexander Chuprov a.chuprov@yadro.com

Close #164 Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
achuprov added 1 commit 2024-11-06 11:20:22 +00:00
[#164] wip: Add clang-format
Some checks failed
Tests and linters / Tests with -race (pull_request) Successful in 2m7s
Tests and linters / Tests (pull_request) Successful in 2m18s
DCO action / DCO (pull_request) Successful in 2m26s
Tests and linters / Lint (pull_request) Successful in 2m52s
Tests and linters / Check clang-format (pull_request) Failing after 8m15s
4f046bcfbc
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
achuprov force-pushed feat/add_clag_format from 4f046bcfbc to af5f29e1ff 2024-11-06 11:34:39 +00:00 Compare
potyarkin reviewed 2024-11-06 11:52:15 +00:00
@ -23,0 +29,4 @@
- name: Restore LLVM
id: cache-primes-restore
uses: actions/cache/restore@v4
Member

Separate save/restore steps are not required if you just want to save cache at the end of workflow run. Single actions/cache invocation will suffice, e.g:

- uses: actions/cache@v4
with:
path: |-
bin/
themes/
key: hugo-${{ runner.os }}-${{ hashFiles('Makefile', 'config.toml') }}
restore-keys: |
hugo-${{ runner.os }}
hugo

Also, assigning ids to steps is not useful if you don't plan to reference these steps later in the workflow.

Separate save/restore steps are not required if you just want to save cache at the end of workflow run. Single `actions/cache` invocation will suffice, e.g: https://git.frostfs.info/TrueCloudLab/frostfs.info/src/commit/576d108b3b05d852794ca5c66a4a0ebaf26e7029/.forgejo/workflows/build.yml#L17-L25 Also, assigning `id`s to steps is not useful if you don't plan to [reference these steps](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#steps-context) later in the workflow.
Author
Member

For clang-format, it seems redundant to me. I didn’t notice any difference in behavior across different versions of clang-format. However, for TrueCloudLab linter, we can add this optimization.

For `clang-format`, it seems redundant to me. I didn’t notice any difference in behavior across different versions of `clang-format`. However, for `TrueCloudLab linter`, we can add this optimization.
achuprov added 3 commits 2024-11-06 12:56:20 +00:00
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
[#164] pre-commit: Add pre-commit
Some checks failed
DCO action / DCO (pull_request) Successful in 1m14s
Tests and linters / Check clang-format (pull_request) Failing after 1m16s
Tests and linters / Tests (pull_request) Successful in 1m44s
Tests and linters / Tests with -race (pull_request) Successful in 2m20s
Tests and linters / Lint (pull_request) Successful in 3m4s
cc3e7b6c71
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
achuprov added 1 commit 2024-11-06 13:05:31 +00:00
[#164] *.js: Fix formatting
All checks were successful
DCO action / DCO (pull_request) Successful in 42s
Tests and linters / Check clang-format (pull_request) Successful in 43s
Tests and linters / Tests (pull_request) Successful in 1m50s
Tests and linters / Tests with -race (pull_request) Successful in 2m45s
Tests and linters / Lint (pull_request) Successful in 3m20s
12afcb844d
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
achuprov force-pushed feat/add_clag_format from 12afcb844d to 6adc201c2c 2024-11-06 13:33:05 +00:00 Compare
achuprov changed title from wip: Add clang-format to WIP: wip: Add clang-format 2024-11-06 13:33:28 +00:00
achuprov changed title from WIP: wip: Add clang-format to Add clang-format 2024-11-06 13:39:04 +00:00
potyarkin approved these changes 2024-11-06 13:48:45 +00:00
Dismissed
dstepanov-yadro approved these changes 2024-11-06 14:30:28 +00:00
Dismissed
acid-ant requested changes 2024-11-07 06:26:51 +00:00
Dismissed
@ -0,0 +33,4 @@
- repo: local
hooks:
- id: make-lint
Member

make-lint -> make-clang?

`make-lint` -> `make-clang`?
acid-ant marked this conversation as resolved
achuprov force-pushed feat/add_clag_format from 6adc201c2c to 26616839e9 2024-11-08 14:56:26 +00:00 Compare
achuprov dismissed potyarkin's review 2024-11-08 14:56:27 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

achuprov dismissed dstepanov-yadro's review 2024-11-08 14:56:27 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

fyrchik reviewed 2024-11-11 07:29:22 +00:00
Makefile Outdated
@ -74,6 +74,9 @@ lint:
fi
$(LINT_DIR)/golangci-lint run --timeout=5m
clang:
Owner

Please, use fmt:, we are not building clang, we are formatting code.

Please, use `fmt:`, we are not building clang, we are formatting code.
Owner

Actually, we already have format.

Actually, we already have `format`.
achuprov force-pushed feat/add_clag_format from 26616839e9 to 5b4a51b703 2024-11-15 15:17:33 +00:00 Compare
achuprov force-pushed feat/add_clag_format from 5b4a51b703 to 7bafdf0477 2024-11-15 15:19:15 +00:00 Compare
achuprov force-pushed feat/add_clag_format from 7bafdf0477 to 978e1b891e 2024-11-15 16:07:36 +00:00 Compare
acid-ant approved these changes 2024-11-18 05:28:52 +00:00
fyrchik requested changes 2024-11-18 06:15:05 +00:00
@ -63,2 +63,4 @@
@go tool cover -html=coverage.txt -o coverage.html
# Install gofumpt
fumpt-install:
Owner

This is completely unrelated to the commit Makefile: Add clang-format support

This is completely unrelated to the commit `Makefile: Add clang-format support`
All checks were successful
DCO action / DCO (pull_request) Successful in 1m14s
Tests and linters / Check format (pull_request) Successful in 1m23s
Tests and linters / Tests (pull_request) Successful in 1m48s
Tests and linters / Tests with -race (pull_request) Successful in 2m4s
Tests and linters / Lint (pull_request) Successful in 3m22s
This pull request has changes conflicting with the target branch.
  • examples/native.js
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u feat/add_clag_format:achuprov-feat/add_clag_format
git checkout achuprov-feat/add_clag_format
Sign in to join this conversation.
No description provided.