Skip to content

[Low] Naming inconsistency: applys() should be applies() #228

@coderabbitai

Description

@coderabbitai

Description

Methods are named applys() instead of the grammatically correct applies(). This naming inconsistency affects API readability and correctness.

Priority

Low – Cosmetic issue, but worth addressing for API cleanliness.

Details

Affected locations:

  • src/parser/ast/root.rs:112
  • src/parser/cst_builder/spans.rs:173

Current state:

  • Methods use the grammatically incorrect plural form applys()
  • Should use the correct third-person singular form applies()

Impact

  • API consistency: Incorrect grammar in public API methods
  • Developer experience: Slightly confusing naming for API consumers
  • Code review: May distract reviewers or be flagged by linters

Actionable Fix

Implement a gradual migration to avoid breaking existing code:

  1. Add applies() aliases alongside existing applys() methods
  2. Deprecate applys() with a migration window and deprecation warnings
  3. Update documentation to recommend applies() over applys()
  4. Update tests gradually to use the new applies() methods
  5. Remove applys() after a reasonable migration period

Benefits:

  • Grammatically correct API
  • No immediate breaking changes
  • Smooth migration path for existing users
  • Improved API consistency

References

Requested by

@leynos

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions