Skip to content

fix: clippy and build mode is not consitent (#122)#123

Closed
lzjqsdd wants to merge 1 commit intomainfrom
hot-fix2
Closed

fix: clippy and build mode is not consitent (#122)#123
lzjqsdd wants to merge 1 commit intomainfrom
hot-fix2

Conversation

@lzjqsdd
Copy link
Copy Markdown
Member

@lzjqsdd lzjqsdd commented Aug 5, 2025

No description provided.

@lzjqsdd lzjqsdd requested review from bigbigxu and Copilot August 5, 2025 11:18
Copy link
Copy Markdown
Contributor

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 an inconsistency between clippy and build modes by making the pre-commit script accept a configurable profile parameter instead of always using release mode.

  • Adds parameter processing to the pre-commit script to accept a build profile
  • Updates the Makefile to pass the MODE variable to the pre-commit script
  • Defaults to "release" profile when no parameter is provided or when "-r" is passed

Reviewed Changes

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

File Description
build/pre-commit.sh Adds profile parameter handling with default to "release"
Makefile Updates format target to pass MODE variable to pre-commit script

PROFILE="release"
fi

cargo clippy --release --fix --all-targets --allow-dirty --allow-staged --allow-no-vcs -- --deny warnings --allow clippy::uninlined-format-args
Copy link

Copilot AI Aug 5, 2025

Choose a reason for hiding this comment

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

The cargo clippy command still uses hardcoded --release flag instead of using the $PROFILE variable that was introduced. This doesn't fix the inconsistency issue described in the PR title.

Copilot uses AI. Check for mistakes.
@lzjqsdd lzjqsdd closed this Aug 5, 2025
@lzjqsdd lzjqsdd added the bug Something isn't working label Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants