revive icon indicating copy to clipboard operation
revive copied to clipboard

Deprecate the use of words Whitelist and Blacklist

Open dschveninger opened this issue 2 years ago • 7 comments

Overview

The words whitelist and blacklist been used for years, but with current events we are questioning if we could some more inclusive terms.

Question

I was wonder if you would be opposed to deprecating the use of the words blacklist and whitelist in this repository?

Suggestion

I would like to get feed back on either addressing the whole repo

Whitelist https://github.com/mgechev/revive/search?q=whitelist Blacklist https://github.com/mgechev/revive/search?q=blacklist

Or just address it with the rules naming and config words. The approach is to mirror the old config with a new config. The old config would echo out a deprecation message for a future version.

Config changes https://github.com/mgechev/revive/blob/a67ecdd7ba96272124152b280054d16368e774ac/config/config.go

if you are not opposed to the idea, I may have someone that can address this. I just wanted to get your feedback first before we would submit a PR.

dschveninger avatar May 21 '22 17:05 dschveninger

Hi @dschveninger, thanks for filling the issue.

Changing all internal declarations and references to whiteList and blackList seems OK and without risk. On the other side, changing rule names (like import-blacklist) and rule configurations should be done very carefully. I propose to go ahead with your suggestion in three steps:

  1. refactoring internal use of whiteList and blackList
  2. add alternatives to external uses of whiteList and blackList and inform of the deprecation
  3. completely remove whiteList and blackList from the code base

Please let me know if you are OK with the approach.

chavacava avatar May 23 '22 10:05 chavacava

I agree with the steps. We will review the steps and submit a PR. Thank you.

dschveninger avatar Jun 21 '22 15:06 dschveninger

@dschveninger do you want to move forward opening a PR? I'd love to make this change happen.

mgechev avatar Aug 07 '22 03:08 mgechev

Hi @dschveninger any suggestions/alternatives to thouse words, that we can prepare some commits in this topic?

mfederowicz avatar Oct 03 '23 21:10 mfederowicz

hey @chavacava any next steps/plans/suggestions with this issue?

mfederowicz avatar Jan 17 '24 12:01 mfederowicz

Hi @mfederowicz if you plan to go ahead with the renaming, your PR are welcome. That said, the next phase of refactoring might imply breaking changes. Thus, before putting some effort on coding, please open a thread to discuss.

chavacava avatar Jan 22 '24 19:01 chavacava

ok i think that we can close this issue, latest changes removed usage of Whitelist and Blacklist

Whitelist https://github.com/mgechev/revive/search?q=whitelist Blacklist https://github.com/mgechev/revive/search?q=blacklist

as you can see there is only one usage of phrase "imports-blacklist" it is only for fix/resolve breaking changes

mfederowicz avatar Feb 04 '24 13:02 mfederowicz