Skip to content

[CLN] Enable full linting - remove continue-on-error from golangci-lint #23

@tazarov

Description

@tazarov

Description

Currently, the CI workflow has continue-on-error: true for the golangci-lint step, which means lint failures don't block merges. This is reasonable for initial development but allows technical debt to accumulate.

Current Configuration

File: .github/workflows/ci.yml:46-49

- name: Run golangci-lint
  uses: golangci/golangci-lint-action@v8
  with:
    version: latest
    args: --concurrency=8 --fix
  # Allow lint failures to not block CI while we iteratively improve code quality.
  continue-on-error: true

Problem

  • New code can introduce linting issues without anyone noticing
  • The --fix flag helps with auto-fixable issues, but not all issues are auto-fixable
  • Over time, the number of lint issues will grow
  • Makes it harder to enforce code quality standards

Proposed Solution

Phase 1: Assess Current State

  1. Run golangci-lint locally and document all current failures
  2. Categorize issues by severity and effort to fix
  3. Create separate issues for each category

Phase 2: Fix Issues

  1. Fix high-severity issues first (bugs, security)
  2. Fix medium-severity issues (code quality, maintainability)
  3. Address or suppress low-severity issues with justification

Phase 3: Enable Full Linting

  1. Remove continue-on-error: true
  2. Consider adding linting to pre-commit hooks
  3. Document suppression policy (when to use //nolint and why)

Timeline

Target: Before v0.2.0 release (or set a specific date)

Alternative Approach

If fixing all issues at once is too much work:

  1. Keep continue-on-error: true for existing code
  2. Add a separate lint step for new/changed files only:
    - name: Lint changed files
      run: golangci-lint run --new-from-rev=main
      # This one should NOT have continue-on-error

Acceptance Criteria

  • Document all current lint failures
  • Create plan to address failures
  • Remove continue-on-error OR implement alternative approach
  • Add linting policy to CONTRIBUTING.md (when to suppress, how to justify)
  • All future PRs must pass linting

Benefits

  • Prevents accumulation of technical debt
  • Maintains consistent code quality
  • Catches potential bugs early
  • Makes codebase easier to maintain

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions