Skip to content

Refactor linters, use all from CLI - #180

Merged
mstdokumaci merged 3 commits into
mainfrom
update-linters
Aug 6, 2026
Merged

mstdokumaci merged 3 commits into
mainfrom
update-linters

Conversation

@mstdokumaci

@mstdokumaci mstdokumaci commented Aug 6, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores

    • Updated the project’s linting and formatting toolchain used during validation.
    • Added a command to automatically format code and sort imports.
    • Removed obsolete linting and import-sorting tooling.
    • Improved consistency of code organization across the project.
  • Documentation

    • Updated contributor guidance with the revised lint and formatting commands.
  • Refactor

    • Standardized import and declaration ordering throughout the codebase without changing runtime behavior.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 64c7284d-bd73-4263-a64d-00c93097a595

📥 Commits

Reviewing files that changed from the base of the PR and between 3f8f9b2 and 93ff5a9.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • package.json
📝 Walkthrough

Walkthrough

The PR replaces the project-specific lint integration with zlint, zsort, and zwanzig, removes the in-repository zsort implementation, and applies automated import and alias ordering across Zig production and test files.

Changes

Lint toolchain migration

Layer / File(s) Summary
Lint configuration and CI
.github/workflows/ci.yml, package.json, build.zig, build.zig.zon, AGENTS.md
CI and package scripts use the expanded lint toolchain. Build configuration and the package manifest remove the prior zsort and zwanzig integration.
Production import normalization
src/authentication/*, src/authorization/*, src/connection/*, src/query/*, src/storage_engine/*, src/subscription/*, src/wire/*, src/server.zig, src/store_service.zig
Production modules reorder imports and local aliases without changing runtime logic or public signatures.
Test and helper normalization
src/**/*_test.zig, src/*test_helpers.zig, src/test_all.zig
Tests and helpers reorder imports and aliases, relocate duplicate bindings, and add the zsort: skip directive.
Removed in-repository sorter
tools/zsort.zig, tools/zsort_test.zig
The custom sorter implementation and its tests are deleted.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: moving linting tools from build integration to CLI-based scripts and CI usage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 85-101: Update the “Install linters” step to verify the downloaded
zlint, zsort, and zwanzig assets against pinned SHA-256 checksums or Sigstore
signatures immediately after download. Make verification fail the workflow
before any extraction, chmod, or installation, and retain the existing
installation flow only after all checks pass.

In `@package.json`:
- Line 12: Update the package.json lint script to use zig fmt --check src
instead of the write-mode zig fmt src, while preserving the existing formatting
behavior in lint:fix.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 65384830-489e-4fa6-866c-7e449ed0df82

📥 Commits

Reviewing files that changed from the base of the PR and between b085221 and c4fe3a7.

📒 Files selected for processing (82)
  • .github/workflows/ci.yml
  • AGENTS.md
  • build.zig
  • build.zig.zon
  • package.json
  • src/app_test_helpers.zig
  • src/authentication/jwt_validator.zig
  • src/authentication/jwt_validator_test.zig
  • src/authentication/ticket_exchange.zig
  • src/authorization/defaults.zig
  • src/authorization/doc_predicate.zig
  • src/authorization/doc_predicate_test.zig
  • src/authorization/evaluate_test.zig
  • src/authorization/session_resolver.zig
  • src/authorization/test_helpers.zig
  • src/checkpoint_test_helpers.zig
  • src/checkpoint_worker_test.zig
  • src/connection/manager.zig
  • src/connection/manager_test.zig
  • src/connection/state.zig
  • src/connection/state_test.zig
  • src/contains_array_equivalence_test.zig
  • src/integration_wiring_test.zig
  • src/logging_test.zig
  • src/message_handler.zig
  • src/message_handler_test.zig
  • src/message_handler_verification_test.zig
  • src/migration_detector_test.zig
  • src/msgpack_test_helpers.zig
  • src/presence/manager_test.zig
  • src/presence/record_test.zig
  • src/presence/service_test.zig
  • src/presence/worker.zig
  • src/presence/worker_test.zig
  • src/query/ast.zig
  • src/query/ast_test.zig
  • src/query/eval.zig
  • src/query/hash_context.zig
  • src/query/hasher.zig
  • src/query/parser.zig
  • src/query/test_helpers.zig
  • src/queues/mpsc_queue_test.zig
  • src/queues/mpsc_queue_thread_safety_test.zig
  • src/schema/test_helpers.zig
  • src/server.zig
  • src/sql/ddl_test.zig
  • src/storage_engine.zig
  • src/storage_engine/cache.zig
  • src/storage_engine/connection.zig
  • src/storage_engine/filter_sql.zig
  • src/storage_engine/read_buffer.zig
  • src/storage_engine/read_worker_perf_test.zig
  • src/storage_engine/read_worker_pool.zig
  • src/storage_engine/reader.zig
  • src/storage_engine/sql.zig
  • src/storage_engine/write_queue.zig
  • src/storage_engine/write_worker.zig
  • src/storage_engine/write_worker_perf_test.zig
  • src/storage_engine_sql_test.zig
  • src/storage_engine_test.zig
  • src/storage_engine_test_helpers.zig
  • src/store_service.zig
  • src/subscription/change_queue.zig
  • src/subscription/consistency_test.zig
  • src/subscription/engine.zig
  • src/subscription/engine_thread_safety_test.zig
  • src/subscription/predicate_trie.zig
  • src/subscription/worker_pool.zig
  • src/subscription/worker_pool_perf_test.zig
  • src/subscription/worker_pool_test.zig
  • src/test_all.zig
  • src/typed/codec.zig
  • src/typed/codec_test.zig
  • src/typed/test_helpers.zig
  • src/typed/types.zig
  • src/typed/types_test.zig
  • src/uwebsockets_wrapper_test.zig
  • src/wire/decode_test.zig
  • src/wire/encode.zig
  • src/wire/encode_test.zig
  • tools/zsort.zig
  • tools/zsort_test.zig
💤 Files with no reviewable changes (8)
  • build.zig.zon
  • src/typed/types.zig
  • build.zig
  • tools/zsort_test.zig
  • src/typed/codec.zig
  • src/storage_engine/connection.zig
  • src/subscription/predicate_trie.zig
  • tools/zsort.zig

Comment thread .github/workflows/ci.yml
Comment thread package.json Outdated
@mstdokumaci
mstdokumaci merged commit 6337810 into main Aug 6, 2026
8 checks passed
@mstdokumaci
mstdokumaci deleted the update-linters branch August 6, 2026 10:21
@coderabbitai coderabbitai Bot mentioned this pull request Aug 6, 2026
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.

1 participant