GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: refuse a quoted "false" for a true/false setting by shenxianpeng · Pull Request #636 · commit-check/commit-check

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Oct 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Before: a true/false setting written as a string is read as truthy, so conventional_commits = "false" leaves the rule on and rejects the commit.

After: it is a config error that names the setting, under exit code 2, like the other wrong-type values the README lists.

cchk.toml message wip bad msg, before after
conventional_commits = false exit 0 exit 0
conventional_commits = "false" exit 1, "should follow Conventional Commits" exit 2, Error: [commit] conventional_commits must be true or false, got 'false'

How: RuleBuilder checks every setting whose default is a boolean (taken from get_default_config(), so new switches are covered) and refuses any other type. CLI flags and CCHK_* variables already go through parse_bool, so only file values can reach the new error. One parametrized test covers a quoted string, an integer and a word in [commit] and [branch].

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@shenxianpeng
fix: refuse a quoted "false" for a true/false setting
faa4792
conventional_commits = "false" is a non-empty string, so the rule it
meant to turn off stayed on and the commit was rejected (exit 1). A
boolean setting given anything but true or false is now a config error
(exit 2) that names the setting.
@shenxianpeng shenxianpeng self-assigned this Oct 20, 2026
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3ac91aee-86b6-436f-9ff8-d9bdf4fc8ed9
📥 Commits

Reviewing files that changed from the base of the PR and between 049bf16 and faa4792.

📒 Files selected for processing: 2
  • commit_check/rule_builder.py
  • tests/rule_builder_test.py
+----------------------------------------------------------------------------------------------------------------------+
| Separate views from models. Gain flexibility at low cost by designing your application in terms of models and views. |
+----------------------------------------------------------------------------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the bug Something isn't working label Oct 20, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 20, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (049bf16) to head (faa4792).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #636   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines         2417      2429   +12     
=========================================
+ Hits          2417      2429   +12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codspeed

codspeed Bot commented Oct 20, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 125 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

  • test_load_config_file_not_found
  • test_inherit_from_key_is_removed_from_result
  • test_inherit_from_nonexistent_file_is_ignored
  • test_validate_without_regex
  • test_commit_message_validator_with_file
  • test_load_config_invalid_toml
  • test_load_config_file_permission_error
  • test_validate_with_merge_base_ahead
  • test_tomli_import_fallback
  • test_load_config_default_commit_check_toml
  • …and 115 more

✅ 647 untouched benchmarks
⏩ 126 skipped benchmarks1


Comparing bugfix/reject-string-booleans (faa4792) with main (e4e31dc)2

Open in CodSpeed

Footnotes

  1. 126 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (049bf16) during the generation of this report, so e4e31dc was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shenxianpeng
shenxianpeng marked this pull request as ready for review October 20, 2026 09:11
@shenxianpeng
shenxianpeng requested a review from a team as a code owner October 20, 2026 09:11
@shenxianpeng
shenxianpeng merged commit 88ca3dc into main Oct 20, 2026
32 of 33 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@shenxianpeng
shenxianpeng deleted the bugfix/reject-string-booleans branch October 20, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@shenxianpeng shenxianpeng

Labels

bug Something isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@shenxianpeng
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.