-
Notifications
You must be signed in to change notification settings - Fork 269
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
fix lint issues #1000
Comments
Hey, @rootulp, Would like to work on this |
Hey @rootulp, some functions are not performing anything ie., left empty, so can I remove them from the file or comment them out? One such example,
|
Hi @Chirag018, thanks for working on this! Ideally we minimize the diff with https://github.com/cometbft/cometbft so in order of preference I would say:
Even if the functions have empty function bodies, they may be necessary to satisfy an interface. Ideally we avoid commented out code. |
* Add `CMT_HOME` (or remove it?) (#983) Closes #982 Added `CMT_HOME` everywhere `CMTHOME` is used. ### Notes to reviewers This could be fixed the opposite way, by removing the only reference to `CMT_HOME` in the code, and also the reference in `UPGRADING.md` (two lines of code). However, the reference in `UPGRADING.md`, which is part of our documentation, is already present in `v0.34.x` (not in `v0.37.x` though!). That's why this PR introduces `CMT_HOME` to work in equal conditions as `CMTHOME`. If reviewers lean toward removing `CMT_HOME` from the doc in `v0.34.x` (and unreleased `v0.38.x` and `main`), I can do it easily. --- #### PR checklist - [x] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments (cherry picked from commit b7be568) # Conflicts: # cmd/cometbft/commands/root_test.go * Revert "Add `CMT_HOME` (or remove it?) (#983)" * Add `CMT_HOME` (or remove it?) (#983) Closes #982 Added `CMT_HOME` everywhere `CMTHOME` is used. This could be fixed the opposite way, by removing the only reference to `CMT_HOME` in the code, and also the reference in `UPGRADING.md` (two lines of code). However, the reference in `UPGRADING.md`, which is part of our documentation, is already present in `v0.34.x` (not in `v0.37.x` though!). That's why this PR introduces `CMT_HOME` to work in equal conditions as `CMTHOME`. If reviewers lean toward removing `CMT_HOME` from the doc in `v0.34.x` (and unreleased `v0.38.x` and `main`), I can do it easily. --- - [x] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: Sergio Mena <[email protected]>
… up to date (#1242) ## Description Decided to take a look at #1000 and see what was up, seems linting DOES run and is not catching issues that are passed locally, but, while here i noticed some very out of date deprecation warnings on github action runtimes. So: - updated `actions/checkout` to `v3` -> `v4` - updated `actions/setup-go` to `v4` -> `v5` - noticed the `git diff` action was stuck on node16 runtime and deprecated, so replicated behavior with paths in workflow trigger, even though it does require 2 entries (1 for push, 1 for pull_request) seemed cleaner than an unmaintained github action workflow - finally: set `setup-go` to use `go.mod` for sourcing the go version. If welcome, i intend to update warnings across all workflows next. --- #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
… up to date (#1242) Decided to take a look at #1000 and see what was up, seems linting DOES run and is not catching issues that are passed locally, but, while here i noticed some very out of date deprecation warnings on github action runtimes. So: - updated `actions/checkout` to `v3` -> `v4` - updated `actions/setup-go` to `v4` -> `v5` - noticed the `git diff` action was stuck on node16 runtime and deprecated, so replicated behavior with paths in workflow trigger, even though it does require 2 entries (1 for push, 1 for pull_request) seemed cleaner than an unmaintained github action workflow - finally: set `setup-go` to use `go.mod` for sourcing the go version. If welcome, i intend to update warnings across all workflows next. --- - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
Context
golangci-lint identifies a bunch of issues but they aren't caught by CI. It's possible the timeout on CI is too low.
Proposal
Additional Details
golangci-lint has unused which should be enabled by default. It is explicitly enabled here. This unused function is flagged along with a bunch of other lint warnings if we run lint with an increased timeout:
Originally posted by @rootulp in #998 (comment)
The text was updated successfully, but these errors were encountered: