[#4] Synchronize with frostfs-node repository #5

Merged
realloc merged 1 commit from george.bartolomey/basic:sync-frostfs-node into master 2024-11-02 14:21:51 +00:00
  • gitlint removed
  • golangci-lint modified
  • gofumpt added
  • go-staticcheck-repo-mod and go-mod-tidy added
  • linters.mk added with linter configuration scenarios

Signed-off-by: George Bartolomey george@bh4.ru

Closes: #4

- gitlint removed - golangci-lint modified - gofumpt added - go-staticcheck-repo-mod and go-mod-tidy added - linters.mk added with linter configuration scenarios Signed-off-by: George Bartolomey <george@bh4.ru> Closes: #4
george.bartolomey added 1 commit 2024-07-12 14:03:16 +00:00
- gitlint removed
- golangci-lint modified
- gofumpt added
- go-staticcheck-repo-mod and go-mod-tidy added
- linters.mk added with linter configuration scenarios

Signed-off-by: George Bartolomey <george@bh4.ru>
realloc requested review from fyrchik 2024-09-06 13:27:35 +00:00
realloc requested review from dstepanov-yadro 2024-09-06 13:27:35 +00:00
realloc requested review from acid-ant 2024-09-06 13:27:45 +00:00
dstepanov-yadro requested changes 2024-09-10 12:06:57 +00:00
Dismissed
.golangci.yml Outdated
@ -34,0 +45,4 @@
noliteral:
target-methods : ["reportFlushError", "reportError"]
disable-packages: ["codes", "err", "res","exec"]
constants-package: "git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"

This relates only for frostfs-node repository

This relates only for `frostfs-node` repository
george.bartolomey marked this conversation as resolved
linters.mk Outdated
@ -0,0 +25,4 @@
$(LINT_DIR)/golangci-lint run
# Run gofumpt
fumpt:

gofumpt install step is also required

`gofumpt` install step is also required

Also staticcheck and gopls ?

Also `staticcheck` and `gopls` ?
Author
Member

Thank you for the remark. Done.

Thank you for the remark. Done.
george.bartolomey marked this conversation as resolved
Owner

While we are here:
I expect Makefile to be different in each repo, there are many differences between the repositories.
That being said we have TrueCloudLab/frostfs-node#389 where we would like to split our monstruous Makefile into multiple ones.
I suggest to make a dir in this repo (mk) where we can store lint.mk, gopls.mk, staticcheck.mk etc., while using include gopls.mk in the main Makefile. This way we can completely override the files we store here, while leaving the Makefile untouched (here it could serve as an example).

While we are here: I expect `Makefile` to be different in each repo, there are many differences between the repositories. That being said we have https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/389 where we would like to split our monstruous `Makefile` into multiple ones. I suggest to make a dir in this repo (`mk`) where we can store `lint.mk`, `gopls.mk`, `staticcheck.mk` etc., while using `include gopls.mk` in the main Makefile. This way we can completely override the files we store here, while leaving the `Makefile` untouched (here it could serve as an example).
george.bartolomey added 2 commits 2024-09-14 17:31:38 +00:00
george.bartolomey requested review from dstepanov-yadro 2024-09-14 17:31:50 +00:00
Author
Member

Note: I will rebase branch including fixups after agreement of PR.

Note: I will rebase branch including fixups after agreement of PR.
george.bartolomey added 1 commit 2024-09-14 17:58:10 +00:00
Signed-off-by: George Bartolomey <george@bh4.ru>
dstepanov-yadro reviewed 2024-09-16 08:08:34 +00:00
CONTRIBUTING.md Outdated
@ -0,0 +28,4 @@
are the steps in details:
### Set up your Forgejo repository
Fork [FrostFS node upstream](https://git.frostfs.info/TrueCloudLab/basic) source

FrostFS node upstream -> FrostFS basic upstream

`FrostFS node upstream` -> `FrostFS basic upstream`
george.bartolomey marked this conversation as resolved
dstepanov-yadro reviewed 2024-09-16 08:09:27 +00:00
CONTRIBUTING.md Outdated
@ -0,0 +58,4 @@
After your code changes, make sure
- To add test cases for the new code.
- To run `make lint` and `make staticcheck-run`

No such targets in this repo.

No such targets in this repo.
Author
Member

What should I do? Delete this instructions or create Makefile?

What should I do? Delete this instructions or create Makefile?

I think delete this instructions

I think delete this instructions
Author
Member

Done.

Done.
george.bartolomey marked this conversation as resolved
dstepanov-yadro reviewed 2024-09-16 08:09:37 +00:00
CONTRIBUTING.md Outdated
@ -0,0 +61,4 @@
- To run `make lint` and `make staticcheck-run`
- To squash your commits into a single commit or a series of logically separated
commits run `git rebase -i`. It's okay to force update your pull request.
- To run `make test` and `make all` completes.

No such targets in this repo.

No such targets in this repo.
george.bartolomey marked this conversation as resolved
dstepanov-yadro reviewed 2024-09-16 08:12:45 +00:00
mk/fumpt.mk Outdated
@ -0,0 +14,4 @@
$(GOFUMPT_VERSION_DIR): fumpt-install
# Run gofumpt
fumpt: $(GOFUMPT_VERSION_DIR)

Does this mean that the installation will be performed at each make fumpt? If yes, then this is not correct: there should be no unnecessary network requests if they are not necessary.

Does this mean that the installation will be performed at each `make fumpt`? If yes, then this is not correct: there should be no unnecessary network requests if they are not necessary.
Author
Member

No, the installation will be performed only if $(GOFUMPT_VERSION_DIR) does not exist.

No, the installation will be performed only if `$(GOFUMPT_VERSION_DIR)` does not exist.
dstepanov-yadro marked this conversation as resolved
dstepanov-yadro reviewed 2024-09-16 08:13:36 +00:00
mk/gopls.mk Outdated
@ -0,0 +15,4 @@
$(GOPLS_VERSION_DIR): gopls-install
# Run gopls
gopls-run: $(GOPLS_VERSION_DIR)

The same as for fumpt about installation.

The same as for `fumpt` about installation.
dstepanov-yadro marked this conversation as resolved
george.bartolomey added 1 commit 2024-09-17 08:53:09 +00:00
Signed-off-by: George Bartolomey <george@bh4.ru>
george.bartolomey added 1 commit 2024-09-17 08:55:44 +00:00
Signed-off-by: George Bartolomey <george@bh4.ru>
george.bartolomey force-pushed sync-frostfs-node from d9c750bd78 to d6acb1d1c0 2024-09-18 07:13:13 +00:00 Compare
dstepanov-yadro approved these changes 2024-09-19 12:59:08 +00:00
realloc merged commit d6acb1d1c0 into master 2024-09-19 19:07:01 +00:00
realloc deleted branch sync-frostfs-node 2024-09-19 19:07:05 +00:00
Sign in to join this conversation.
No description provided.