Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maintain words in .spelling sorted alphabetically #83

Open
andyli opened this issue Oct 31, 2016 · 2 comments
Open

maintain words in .spelling sorted alphabetically #83

andyli opened this issue Oct 31, 2016 · 2 comments

Comments

@andyli
Copy link

andyli commented Oct 31, 2016

Feature request:
Can the CLI keeps the words in .spelling sorted alphabetically?
It would be easier to read.

@dreh23
Copy link

dreh23 commented Jun 12, 2020

Maybe this is useful. We have a Makefile target like this:

format-spelling:
        sort < .spelling | sort | uniq | tee .spelling.tmp > /dev/null && mv .spelling.tmp .spelling

A bit hacky, but works.

@agilgur5
Copy link

Some other workaround scripts from argoproj/argo-workflows#12521:

Simple version:

cat .spelling | sort | uniq | tee .spelling > /dev/null

More complex skipping a few comments at the top of the file:

# alphabetize spelling file -- ignore first 5 lines (comments), then sort the rest case-sensitive and remove duplicates
cat .spelling | awk 'NR<6{ print $0; next } { print $0 | "sort" }' | uniq | tee .spelling > /dev/null

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

No branches or pull requests

3 participants