Skip to content

Fix compiler warnings#548

Open
pierre-rouleau wants to merge 1 commit intojacktasia:masterfrom
pierre-rouleau:fix-new-warnings
Open

Fix compiler warnings#548
pierre-rouleau wants to merge 1 commit intojacktasia:masterfrom
pierre-rouleau:fix-new-warnings

Conversation

@pierre-rouleau
Copy link
Contributor

@pierre-rouleau pierre-rouleau commented Mar 16, 2026

  • The dumb-jump-extra-search-paths-function docstring has a long line that triggers the docstring-wide warning. Since it's difficult to refactor the example text, I disabled the compiler docstring-wide around the defcustom explicitly:

    • I started using (let ((byte-compile-warnings '(not docstrings-wide))) ) block to surround the defcustom form, but that only work in Emacs 30 and later.
    • So I ended up using a with-no-warnings wrapping instead. This will unfortunately disable all warnings inside that code... Maybe you can find a way to express the example in
  • The dumb-jump-get-project-root either call the new project-root if available or project-roots in Emacs 26.x. However that triggers a warning when compiled in later Emacs versions. I surround the code in a with-no-warnings form to prevent the warning.

  • In dumb-jump-find-references: prevent warning about dump-jump-go as in the other functions using it.

  • Reduced the length of the dumb-jump-populate-regex-for-emacs doctring first line.

  • Also removed the trailing spaces.

I would recommend to byte-compile the code with warnings treated as errors now that warnings were eliminated from the code base.

Summary by CodeRabbit

  • Documentation

    • Improved docstring clarity for regex matching functionality.
  • Style

    • Minor formatting adjustments throughout the codebase.

* The `dumb-jump-extra-search-paths-function` docstring has a long line that
  triggers the docstring-wide warning.  Since it's difficult to refactor the
  example text, I disabled the compiler docstring-wide around the defcustom
  explicitly:
  - I started using `(let ((byte-compile-warnings '(not docstrings-wide))) )`
    block to surround the defcustom form, but that only work in Emacs 30 and
    later.
  - So I ended up using a with-no-warnings wrapping instead.
    This will unfortunately disable all warnings inside that code...
    Maybe you can find a way to express the example in

* The `dumb-jump-get-project-root` either call the new `project-root` if
  available or `project-roots` in Emacs 26.x.  However that triggers a warning
  when compiled in later Emacs versions. I surround the code in a
  `with-no-warnings` form to prevent the warning.

* In `dumb-jump-find-references`: prevent warning about `dump-jump-go`
  as in the other functions using it.

* Reduced the length of the `dumb-jump-populate-regex-for-emacs` doctring
  first line.

* Also removed the trailing spaces.

I would recommend to byte-compile the code with warnings treated as errors now
that warnings were eliminated from the code base.
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e4855ab3-be78-451e-873a-cde9310135a1

📥 Commits

Reviewing files that changed from the base of the PR and between 41b6b9d and 7c2b9cd.

📒 Files selected for processing (1)
  • dumb-jump.el

Walkthrough

This change modifies dumb-jump.el to suppress compatibility warnings and improve docstrings. Adjustments include wrapping defcustom declarations and function calls with with-no-warnings to handle Emacs version differences, updating docstrings for clarity, and applying minor formatting fixes. No functional logic is altered.

Changes

Cohort / File(s) Summary
Warning Suppression & Compatibility
dumb-jump.el
Wrapped defcustom dumb-jump-extra-search-paths-function and project-roots calls with with-no-warnings to accommodate Emacs 26.1+ deprecations. Additional with-no-warnings wrapping applied to function calls to suppress compatibility warnings.
Documentation & Formatting
dumb-jump.el
Expanded docstring for dumb-jump-extra-search-paths-function with detailed argument and return value descriptions. Updated dumb-jump-populate-regex-for-emacs docstring for clarity. Minor formatting adjustment to Solidity rule entry.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • jacktasia
🚥 Pre-merge checks | ✅ 3
✅ 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 'Fix compiler warnings' accurately summarizes the main objective of the pull request - suppressing compiler warnings through strategic use of with-no-warnings wrappers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

Tip

CodeRabbit can suggest fixes for GitHub Check annotations.

Configure the reviews.tools.github-checks setting to adjust the time to wait for GitHub Checks to complete.

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