Inclusive Language Features

Is there a way to quickly get features added to SQ for “inclusive language” as a part of code smells? Terms like “master”, “slave”, “whitelist”, and “blacklist” or other terms could be flagged as debt to be cleaned up. Anything in the works for this? Is there some way to implement this in my own configuration today?

Jeff

Hello @Jeff_Mathers,

Thanks for the suggestion. On SonarQube/SonarCloud side we plan to replace “master/slave” (and more) with a better terminology: https://jira.sonarsource.com/browse/SONAR-13623.

Instead of having a generic rule raising Code Smells where we will have to take into account the translation of these terms in all the languages and keep it up-to-date, I would like to suggest another approach.

I believe the best and quickest approach could be this one:

  • you create a script doing a grep or similar search in your code to find these terms
  • you execute this script as part of your CI and you generate a file compatible with the Generic Issue Import Format
  • you import this file into SonarQube so that it impacts your overall technical debt

Alex

2 Likes

I was also thinking of code and package levels. These terms sometimes also appear in classnames or namespaces.