Skip to content

fix: misplaced doc comment and section numbering after refactor#144

Merged
HiGarfield merged 2 commits intomasterfrom
copilot/fix-issues-after-refactor
Mar 20, 2026
Merged

fix: misplaced doc comment and section numbering after refactor#144
HiGarfield merged 2 commits intomasterfrom
copilot/fix-issues-after-refactor

Conversation

Copy link

Copilot AI commented Mar 20, 2026

Two cosmetic/structural issues introduced by the recent refactoring.

Changes

  • src/limiter.c — The Doxygen comment for run_pid_or_exe_mode() was stranded between run_command_mode() and the static helper report_process_not_found(), leaving run_pid_or_exe_mode() with no comment at its definition site. Moved it directly above the function it documents.

    Before:

    } /* end run_command_mode */
    
    /** @brief Search for and limit an existing process ... */wrong position
    
    /** @brief Report that the target process could not be found. */
    static void report_process_not_found(...) { ... }
    
    void run_pid_or_exe_mode(...) { ... }  ← no comment here

    After: report_process_not_found comment stays, run_pid_or_exe_mode comment moves to sit directly above it.

  • cmake/CpulimitOptions.cmake — Section headers were numbered 1, 3, 4, 5 (section 2 was removed during refactoring without renumbering the rest). Corrected to 1, 2, 3, 4.


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

The documentation comment for run_pid_or_exe_mode() was placed
before report_process_not_found() instead of directly above its
own function definition. Move it to the correct position.

Co-authored-by: HiGarfield <32226909+HiGarfield@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix bugs and improve comments after major refactor fix: misplaced doc comment and section numbering after refactor Mar 20, 2026
Copilot AI requested a review from HiGarfield March 20, 2026 05:46
@HiGarfield HiGarfield marked this pull request as ready for review March 20, 2026 05:51
Copilot AI review requested due to automatic review settings March 20, 2026 05:51
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes two cosmetic/structural issues introduced by a recent refactor: a misplaced Doxygen doc comment in src/limiter.c and incorrect section numbering in cmake/CpulimitOptions.cmake, improving readability and documentation consistency.

Changes:

  • Moved the Doxygen comment for run_pid_or_exe_mode() to sit directly above its definition (instead of being stranded above report_process_not_found()).
  • Renumbered CMake section headers to restore sequential ordering (1–4).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/limiter.c Repositions the run_pid_or_exe_mode() Doxygen block to the correct function definition site.
cmake/CpulimitOptions.cmake Fixes section header numbering to be sequential after prior refactor removals.

@HiGarfield HiGarfield merged commit 0628d47 into master Mar 20, 2026
4 checks passed
@HiGarfield HiGarfield deleted the copilot/fix-issues-after-refactor branch March 20, 2026 17:53
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.

3 participants