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

Remove duplicated items #9

Closed
wants to merge 2 commits into from
Closed

Remove duplicated items #9

wants to merge 2 commits into from

Conversation

shinnn
Copy link
Contributor

@shinnn shinnn commented Nov 27, 2015

Problem

I noticed that the pattern list includes some duplicated values. For example,

$ echo addicts | alex
<stdin>
    1:1-1:8  warning  `addicts` may be insensitive, use `people with a drug addiction`, `people recovering from a drug addiction` instead
    1:1-1:8  warning  `addicts` may be insensitive, use `people with a drug addiction`, `people recovering from a drug addiction` instead

⚠ 2 warnings

Solution

  1. I added a validation script to ensure the YAML resource files have no duplicated values. 6a5dcb1

    • If a YAML file includes duplicated values, it throws an error like below and won't write files.
    Error: "ablist.yml" has duplicated value(s): 
    {
      "type": "simple",
      "considerate": "person with learning disabilities",
      "inconsiderate": "learning disabled"
    }
    {
      "type": "simple",
      "considerate": [
        "turned off",
        "person with a disability",
        "people with disabilities"
      ],
      "inconsiderate": [
        "disabled"
      ]
    }
    
  2. I removed duplicated values in accordance with the validation, and rebuilt files. 2f54a05

@wooorm wooorm closed this in f77ba36 Nov 28, 2015
@wooorm
Copy link
Member

wooorm commented Nov 28, 2015

Thanks a lot @shinnn! Great work!

@wooorm wooorm added ⛵️ status/released 🐛 type/bug This is a problem 👶 semver/patch This is a backwards-compatible fix 🗄 area/interface This affects the public interface labels Aug 13, 2019
@wooorm wooorm added the 💪 phase/solved Post is done label Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem
Development

Successfully merging this pull request may close these issues.

2 participants