mozilla / addons-linter

🔍 Firefox Add-ons linter, written in JavaScript. 👁
Mozilla Public License 2.0
318 stars 145 forks source link

src/badwords.json false positive: "Cum" is short for "Friday" in Turkish #2553

Closed lidel closed 5 years ago

lidel commented 5 years ago

Describe the problem and steps to reproduce it:

The

https://github.com/mozilla/addons-linter/blob/402884cbab96980283327dd1a7c6d2bb1c0ac71c/src/badwords.json#L91

triggers MOZILLA_COND_OF_USE tr_TR translations of day names such as https://github.com/samsonjs/strftime/blob/v0.10.0/strftime.js#L227:

shortDays: ['Paz', 'Pzt', 'Sal', 'Çrş', 'Prş', 'Cum', 'Cts'],

What happened?

False-positive MOZILLA_COND_OF_USE is displayed.

What did you expect to happen?

No MOZILLA_COND_OF_USE if Cum is acompanied by other Turkish day name shortcuts.

Anything else we should know?

This is a bigger problem than it seems because day names are often hardcoded in i18n libraries. This means every extension shipping with tr_TR locale will trigger MOZILLA_COND_OF_USE

References

wagnerand commented 5 years ago

Closing in favor of https://github.com/mozilla/addons-linter/issues/2591.