feat: --no-fail-public — report unused public declarations without failing the build - #23
Merged
Conversation
claude Bot
pushed a commit
that referenced
this pull request
Jul 24, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012RMbmsRmDqx5eWXFa8R82V
--no-fail-public keeps unused public declarations in the report but excludes them from the exit code under --set-exit-if-changed, so CI can surface unused public API as advisory while still failing only on unused private declarations. The default (--fail-public) is unchanged. Defined as a CiachOption enum entry so it is settable from ciach.yaml too, matching how every other option is now declared.
claude
Bot
force-pushed
the
feat/no-fail-public
branch
from
August 5, 2026 10:24
13da502 to
c372679
Compare
It duplicated the options table and the GitHub Actions section, and its longer command broke the aligned comment column in the usage block.
PiotrRogulski
marked this pull request as ready for review
August 5, 2026 10:52
PiotrRogulski
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Requested by Łukasz Komoszyński · Slack thread
Before
--set-exit-if-changedfails on any unused declaration.--no-publichides public findings entirely — so you could report public API or gate CI on private, never both.After
--no-fail-publickeeps public findings in the report but drops them from the exit code: CI surfaces unused public API as advisory while failing only on unused private declarations. Default unchanged (--fail-publicon).Why
For
leancode_flutter_templateCI, where the workspace keeps intentional-but-unused public API for downstream apps — one run both reports everything and gates on private only.How
failPublicCiachOptionenum entry (FlagOption, argNamefail-public, configKey/fail-public, defaulttrue), so it's also settable fromciach.yaml.ResolvedOptions.failPublic;bin/ciach.dartdrops public findings (isPrivate) from the exit-code subset when off. Report path unchanged.test/cli_exit_code_test.dart) driving the real binary against the fixture.