Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: codacy/codacy-cloud-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: codacy/codacy-cloud-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feat/patterns-matches-stack
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 10 files changed
  • 2 contributors

Commits on Sep 9, 2026

  1. feat: add --matches-stack filter to the patterns command

    Exposes the API's new `matchesStack` query param on `codacy patterns`, so a
    tool's code patterns can be narrowed to those that do (or don't) match the
    repository's detected stack. Tri-state, matching the existing
    `issues --false-positives`: the bare flag or `true` sends `matchesStack=true`,
    `false` sends `matchesStack=false`, omitting it sends nothing.
    
    Applies in bulk mode too, so `--enable-all`/`--disable-all` can be scoped to
    the stack. The post-update `toolPatternsOverview` call deliberately stays
    unfiltered — its counts describe the whole tool, not the updated subset.
    
    Required bumping the pinned API spec 57.3.9 -> 57.4.17 (`matchesStack` first
    ships in 57.4.14). The spec delta is purely additive, but the param is
    inserted mid-signature on `listRepositoryToolPatterns` (arg 12, before
    `sort`), so the full-positional-arg assertions in patterns.test.ts each
    gained a trailing `undefined`. `pattern.ts`/`issues.ts` stop at `search`
    (arg 9) and were unaffected.
    
    Also re-verified the repository-token whitelist as AGENTS.md requires after
    `update-api`: 57.4.x now declares the `ProjectTokenAuth` scheme in the spec
    (absent in 57.3.9), making the list machine-checkable, and it is 14
    operations rather than 13 — the addition, `searchAiInventoryCategories`, is
    unused here. `patterns` stays fully whitelisted, so no new token guard.
    
    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
    alerizzo and claude committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    c87893b View commit details
    Browse the repository at this point in the history
  2. fix: reject non-boolean --matches-stack values instead of eating a po…

    …sitional
    
    Code review caught a real bug in the new flag. Commander's optional-value
    syntax (`[value]`) greedily consumes the next token, so
    
        codacy patterns gh my-org my-repo --matches-stack eslint
    
    parsed as matchesStack=true with `eslint` silently swallowed, and then failed
    with "Ambiguous arguments for 'patterns'. Expected 1 or 4 positional
    arguments, got 3." — an error that never mentions the flag that ate the tool
    name. Every test and doc example placed the flag after the tool name, so the
    broken ordering was never exercised.
    
    `--matches-stack` now uses a new `strictBooleanOption()` that accepts only
    true/false and otherwise errors immediately, naming the flag and the offending
    value and saying where to put the argument. The three specified behaviours
    (bare flag, explicit true, explicit false) are unchanged.
    
    Also drops the redundant tri-state re-derivation in patterns.ts: Commander
    already yields exactly true | false | undefined, so the value is passed
    through directly.
    
    `issues --false-positives` keeps the lax parser and the same latent hazard —
    left alone to keep this change in scope, and flagged as a follow-up in
    SPECS/commands/tools-and-patterns.md.
    
    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
    alerizzo and claude committed Sep 9, 2026
    Configuration menu
    Copy the full SHA
    70c43cf View commit details
    Browse the repository at this point in the history
Loading