Skip to content

Conversation

@Saurabh2402
Copy link
Contributor

@Saurabh2402 Saurabh2402 commented Jul 22, 2025

Changes Made

  • New file: .golangci.yaml with golangci-lint-v2

  • Formatters enabled:

    • gofmt with simplification enabled
    • gofumpt with extra rules and proper module path configuration
  • Code Quality Improvements:

    • All existing code has been linted and formatted according to the new configuration
    • Fixed any linting issues found during the process
  • 🔧 Code Fixes:

    • Replaced assert.Nil(t, err) with assert.NoError(t, err) in _test.go files
    • Simplified function parameter declarations (e.g., func(k []byte, v []byte)func(k, v []byte))
    • Remove redundant typecastings
    • Simplified copying - copy(key[:], buf[index:index+uint32(keySize)])copy(key, buf[index:index+uint32(keySize)])

@Saurabh2402
Copy link
Contributor Author

⚠️ Linter Issue Requiring Maintainer Input

The nilerr linter has flagged a potential issue in db.go at various lines, where an error is checked but nil is returned instead of the actual error:

if err != nil {
    return false, nil  // nilerr: error is not nil but returns nil
}
Screenshot 2025-07-22 at 10 34 09 PM

Should this be changed to return false, err to properly propagate the error, or is the current behavior intentional (e.g., treating this error as a non-fatal condition where the iteration should continue)?

@Saurabh2402
Copy link
Contributor Author

@roseduan Hi, This PR is ready for your review

@roseduan
Copy link
Collaborator

@roseduan Hi, This PR is ready for your review

Thanks a lot.

@roseduan roseduan merged commit 6e46d15 into rosedblabs:main Aug 12, 2025
2 checks passed
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.

2 participants