Skip to content

[Feature]: augment code for adding to WORDLIST #231

@k-doering-NOAA

Description

@k-doering-NOAA

Is your feature request related to a problem? Please describe.

I wasn't able to successfully use the code mentioned in the spelling github action to add to the wordlist. It currently reads:

# Following R code can be used to add words to the WORDLIST file:
wordlist_path <- file.path('inst', 'WORDLIST')
all_words <- c(word_list, spell_check_results$word)
sorted_words <- sort(unique(all_words))
writeLines(sorted_words, wordlist_path)

Describe the solution you would like.

I think 2 additions are needed to make this code straightforward to use, here is a mix of code and pseudo code:

# Following R code can be used to add words to the WORDLIST file:
wordlist_path <- file.path('inst', 'WORDLIST')
word_list <- readLines(wordlist_path)
# need code here to get spell_check_results$word - not sure the best way to do this
all_words <- c(word_list, spell_check_results$word)
sorted_words <- sort(unique(all_words))
writeLines(sorted_words, wordlist_path)

Describe alternatives you have considered

write a function in ghactions4r to add new words when they are discovered in spell_check_files().

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions