Skip to content

add settings for loops and literals#96

Merged
Crocmagnon merged 3 commits into
mainfrom
dev/settings
Jun 26, 2026
Merged

add settings for loops and literals#96
Crocmagnon merged 3 commits into
mainfrom
dev/settings

Conversation

@Crocmagnon

@Crocmagnon Crocmagnon commented Jun 26, 2026

Copy link
Copy Markdown
Owner

closes #94

Summary by CodeRabbit

  • New Features

    • Added configurable checks for loop and function-literal cases, with updated examples in the docs.
    • Added new command shortcuts for running lint and tests.
  • Bug Fixes

    • Improved report filtering so disabled checks are respected in more contexts.
    • Updated CI and local hooks to use the same test command as the development workflow.
  • Documentation

    • Expanded setup and usage guidance with configuration options and refreshed development commands.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

The PR adds separate analyzer flags for loop and function-literal checks, updates analyzer filtering and tests for the new options, and switches repo lint/test entrypoints from make to mise across workflow, hooks, tasks, and developer docs.

Changes

Analyzer context checks

Layer / File(s) Summary
Flags, wiring, and configuration docs
pkg/analyzer/analyzer.go, README.md
Adds exported flags for loop and function-literal checks, wires them into NewAnalyzer, and documents the options and examples in the README.
Report filtering and runner internals
pkg/analyzer/analyzer.go
Adds runner fields for the new checks, switches report suppression to category-based handling, and updates helper signatures to any.
Analyzer cases and fixtures
pkg/analyzer/analyzer_test.go, pkg/analyzer/testdata/src/no_loops/example.go, pkg/analyzer/testdata/src/no_function_literals/example.go
Adds cases and fixtures for disabling loop checks and disabling function-literal checks.

Mise-based tooling updates

Layer / File(s) Summary
Lint configuration and local hook
.golangci.yml, .pre-commit-config.yaml, mise.toml
Updates lint settings, switches the local go-test hook to mise run test with pass_filenames: false, and adds lint and test tasks.
Workflow and command docs
.github/workflows/go.yml, CLAUDE.md, README.md
Updates the Go workflow to install mise and run mise run test, and switches documented lint/test commands to mise run; the old Makefile lint/test targets are removed.

Sequence Diagram(s)

sequenceDiagram
  participant NewAnalyzer
  participant runner
  participant shouldIgnoreReport
  NewAnalyzer->>runner: wire loop and function-literal flags
  runner->>shouldIgnoreReport: evaluate report category
  shouldIgnoreReport-->>runner: ignore or keep report
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped past loops and closures bright,
With mise in paw, the tests ran light.
Carrot-code crunch, then hop, hooray,
The lint logs munched the old way away.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The workflow, Makefile, README, and CLI/tooling updates go beyond #94's loop/literal configuration scope. Move the mise/CI/docs changes to a separate PR or trim them here so the patch stays focused on the analyzer settings.
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding separate settings for loop and literal checks.
Linked Issues check ✅ Passed The PR adds separate loop and function-literal flags, matching #94's request to configure those checks independently.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev/settings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@Crocmagnon Crocmagnon marked this pull request as ready for review June 26, 2026 10:37
@Crocmagnon Crocmagnon merged commit 0a5ad1f into main Jun 26, 2026
11 of 12 checks passed
@Crocmagnon Crocmagnon deleted the dev/settings branch June 26, 2026 10:44
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.

Provide options to check loops and literals separately

1 participant