Skip to content

chore: lint code#114

Merged
melekes merged 36 commits intocometbft:mainfrom
faddat:faddat/lint-after-pebble-cause-should-do-both
Jan 24, 2024
Merged

chore: lint code#114
melekes merged 36 commits intocometbft:mainfrom
faddat:faddat/lint-after-pebble-cause-should-do-both

Conversation

@faddat
Copy link
Copy Markdown
Contributor

@faddat faddat commented Jan 7, 2024

Closes: #113

  • add pebbledb
  • use latest pebble
  • added a ton of test rigor and fixed linting

This PR lints tm-db

closes: #113

@faddat faddat requested a review from a team as a code owner January 7, 2024 09:58
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 7, 2024

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (649c0ef) 77.15% compared to head (fc6b646) 76.91%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
- Coverage   77.15%   76.91%   -0.24%     
==========================================
  Files          23       23              
  Lines        2057     2058       +1     
==========================================
- Hits         1587     1583       -4     
- Misses        399      403       +4     
- Partials       71       72       +1     
Files Coverage Δ
badger_db.go 87.77% <100.00%> (ø)
boltdb.go 57.25% <100.00%> (ø)
cleveldb.go 70.99% <100.00%> (ø)
goleveldb.go 59.84% <100.00%> (ø)
rocksdb.go 72.05% <100.00%> (ø)
test_helpers.go 100.00% <100.00%> (ø)
util.go 36.66% <100.00%> (ø)
db.go 35.00% <50.00%> (ø)
pebble.go 74.34% <83.33%> (-0.29%) ⬇️
memdb_iterator.go 90.42% <33.33%> (-2.99%) ⬇️
... and 1 more
Files Coverage Δ
badger_db.go 87.77% <100.00%> (ø)
boltdb.go 57.25% <100.00%> (ø)
cleveldb.go 70.99% <100.00%> (ø)
goleveldb.go 59.84% <100.00%> (ø)
rocksdb.go 72.05% <100.00%> (ø)
test_helpers.go 100.00% <100.00%> (ø)
util.go 36.66% <100.00%> (ø)
db.go 35.00% <50.00%> (ø)
pebble.go 74.34% <83.33%> (-0.29%) ⬇️
memdb_iterator.go 90.42% <33.33%> (-2.99%) ⬇️
... and 1 more

@faddat
Copy link
Copy Markdown
Contributor Author

faddat commented Jan 7, 2024

let's do it. codecov is unhelpful anyhow.

@faddat faddat closed this Jan 7, 2024
@faddat faddat reopened this Jan 9, 2024
faddat and others added 12 commits January 20, 2024 01:30
Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>
Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>
Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>
Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>
Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>
Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>
@melekes
Copy link
Copy Markdown
Collaborator

melekes commented Jan 24, 2024

Is it possible to exclude Pebble from this PR and make it only about lint changes?

@melekes
Copy link
Copy Markdown
Collaborator

melekes commented Jan 24, 2024

#112 needs to be merged first.

@melekes melekes changed the title lint chore: lint code Jan 24, 2024
@faddat
Copy link
Copy Markdown
Contributor Author

faddat commented Jan 24, 2024

@melekes yes, I agree.

Comment thread .changelog/unreleased/feat/112.md Outdated
Comment thread .golangci.yml
linters-settings:
errcheck:
check-blank: true
depguard:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

do you mind bringing this back?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Few minutes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

generally, depguard isn't in my lint religion -- did you want it back & configured?

Comment thread CHANGELOG.md Outdated
@melekes
Copy link
Copy Markdown
Collaborator

melekes commented Jan 24, 2024

./pebble.go:60:107: too many arguments in call to registerDBCreator
	have (BackendType, func(name string, dir string) (DB, error), bool)
	want (BackendType, dbCreator)

looks like I broke something. sorry about that

@faddat
Copy link
Copy Markdown
Contributor Author

faddat commented Jan 24, 2024

Oh that's okay I'll fix it

@faddat
Copy link
Copy Markdown
Contributor Author

faddat commented Jan 24, 2024

I'll add a make test-pebble to default test runs..

Comment thread CHANGELOG.md Outdated
@@ -1,5 +1,9 @@
# CHANGELOG

*Jan 24, 2024*
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please remove

@melekes melekes added this pull request to the merge queue Jan 24, 2024
Merged via the queue into cometbft:main with commit 5e2bd08 Jan 24, 2024
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.

linter config broken

3 participants