Skip to content

refactor(ipa): Move grammaticalWords and ignoreList to shared utility file - #1356

Closed
julius-jogela wants to merge 6 commits into
mainfrom
CLOUDP-373281-move-lists-to-util
Closed

julius-jogela wants to merge 6 commits into
mainfrom
CLOUDP-373281-move-lists-to-util

Conversation

@julius-jogela

@julius-jogela julius-jogela commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Consolidate grammaticalWords and ignoreList configuration from IPA-126 and IPA-117 rulesets into a shared utility file to eliminate duplication and maintain a single source of truth.

Changes

  • Create new utility file /tools/spectral/ipa/rulesets/functions/utils/grammaticalWordsAndIgnoreList.js with 4 exported constants
  • Update IPA126TagNamesShouldUseTitleCase.js to import from shared utility instead of receiving parameters from YAML
  • Update IPA117OperationSummaryFormat.js to import from shared utility instead of receiving parameters from YAML
  • Remove hardcoded ignoreList and grammaticalWords from IPA-126.yaml and IPA-117.yaml for cleanup

Related Ticket

Closes CLOUDP-373281

Testing

  • ✅ All 696 tests pass
  • ✅ npm run ipa-validation passes with no errors
  • ✅ Code formatting verified with Prettier
  • ✅ No functional changes to rule behavior

… file

- Create new utility file grammaticalWordsAndIgnoreList.js with shared configuration
- Update IPA-126 and IPA-117 functions to import from shared utility instead of YAML
- Remove hardcoded lists from IPA-126.yaml and IPA-117.yaml for cleanup
- All tests pass: 696 passed, no regressions
@julius-jogela
julius-jogela requested a review from a team as a code owner July 7, 2026 09:31
@julius-jogela
julius-jogela force-pushed the CLOUDP-373281-move-lists-to-util branch 2 times, most recently from 536a905 to 662ab2c Compare July 7, 2026 09:39
Comment thread tools/spectral/ipa/rulesets/functions/utils/grammaticalWordsAndIgnoreList.js Outdated
@wtrocki

wtrocki commented Jul 7, 2026 •

Copy link
Copy Markdown
Member

@julius-jogela @yelizhenden-mdb While we're working on this, can we make sure there's a way to override the word list in the package? Embedding a word list directly in the package isn't a typical use case for a library, and maintaining those lists creates ongoing overhead — every new word requires a release and update of downstream clients that require that new word.

I think we can:

  • Avoid embedding words in the package
  • Keep examples but let users to override those when using library.
  • Keep world list consolidated in package.

@julius-jogela
julius-jogela force-pushed the CLOUDP-373281-move-lists-to-util branch from 662ab2c to 2a21cc4 Compare July 7, 2026 10:12
Comment thread tools/spectral/ipa/rulesets/functions/utils/grammaticalWordsAndIgnoreList.js Outdated
Comment thread tools/spectral/ipa/rulesets/functions/IPA117OperationSummaryFormat.js Outdated
Comment thread tools/spectral/ipa/rulesets/functions/IPA126TagNamesShouldUseTitleCase.js Outdated
Comment thread tools/spectral/ipa/rulesets/IPA-126.yaml Outdated
Comment thread tools/spectral/ipa/rulesets/README.md Outdated
… file

- Merge IPA-126 and IPA-117 lists into single shared IGNORE_LIST and GRAMMATICAL_WORDS
- Update IPA126TagNamesShouldUseTitleCase.js to use shared lists
- Update IPA117OperationSummaryFormat.js to use shared lists
- Remove hardcoded lists from IPA-126.yaml and IPA-117.yaml
- Add temporary override for X.509 Authentication tag (xgen-IPA-126-tag-names-should-use-title-case) while upstream specs update
- All 696 tests pass, npm run ipa-validation passes
@julius-jogela
julius-jogela force-pushed the CLOUDP-373281-move-lists-to-util branch from 2a21cc4 to dfba04e Compare July 7, 2026 11:25
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.

3 participants