Skip to content

naming: add affix pressure rule#43

Merged
PerishCode merged 1 commit into
mainfrom
naming/affix-pressure
Jun 7, 2026
Merged

naming: add affix pressure rule#43
PerishCode merged 1 commit into
mainfrom
naming/affix-pressure

Conversation

@PerishCode

Copy link
Copy Markdown
Owner

Why

Repeated naming affixes such as parse_ can reveal structure that is still
living inside identifiers. The new affix-pressure rule needs a conservative
cross-language implementation and a real self-check loop that treats warnings
as refactoring input instead of suppressing them with a higher threshold.

What

  • Add core/naming/affix-pressure over existing function and method name facts.
  • Bucket one-word prefixes and suffixes per file, with default
    min_occurrences=15 and config override support.
  • Wire the rule through Rust, TypeScript, Python, Vue, and Svelte language
    analysis without adding language-specific semantics.
  • Add unit coverage for default non-reporting and low-threshold reporting.
  • Apply the rule guidance to existing parser/test pressure:
    • group TypeScript parser tests into semantic modules;
    • keep TypeScript parser entrypoints as parse_* while naming private helpers
      by structure;
    • rename Svelte/Vue markup/template private parser steps to structure names.

Tests

  • cargo fmt --all --check
  • cargo test --locked -p flavor-plugin-svelte -p flavor-plugin-vue -p flavor-plugin-typescript
  • cargo clippy --locked --workspace --all-targets -- -D warnings
  • cargo run --locked -p flavor-cli -- check --root . --config flavor.toml
  • cargo test --locked --workspace

@PerishCode PerishCode marked this pull request as ready for review June 7, 2026 13:56
@PerishCode PerishCode enabled auto-merge (squash) June 7, 2026 13:56
@PerishCode PerishCode merged commit 27eebe0 into main Jun 7, 2026
1 check passed
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.

1 participant