Make your code inclusive!
The Inclusiveness Analyzer is a GitHub action that checks your repository for offensive / exclusive terms.
It also provides context on why a word is exclusive and suggests alternate terms that can be used instead.
- Browse to the Inclusiveness Analyzer Visual Studio Marketplace page.
- Select Get it free
- Select your organisation from the list and select Install
Once you have installed the extension in your organization you can use it in any of the organization's Build pipelines.
-
In your Azure DevOps project browse to Pipelines and either add or edit a Pipeline.
-
Search for Inclusiveness Analyzer from the Tasks pane on the right.
-
Run the pipeline and view the output generated by the Inclusiveness Analyzer step.
Use the options below to configure exclusions and build state when non-inclusive terms are found in the repository.
buildStatusOnNonInclusiveTerm
Status of the build when non-inclusive terms are found.
Options:
warning
(Default) - Build completes with a warning state.failed
- Breaks the build if non-inclusive terms are found.success
- Build completes successfully
excludeUnchangedFiles
If true
(Default) limits the scan to files changed in the latest commit. If false
a full scan is run on each commit.
The git checkout step needs to have at least 'with: fetch-depth: 2' configured.|
excludeFromScan
Comma separated list of file patterns to exclude from analysis. Glob patterns are supported with a prefix of **/
Eg. **/skipme.txt,**/donotscan/*
excludeTerms
Comma separated list of non-inclusive terms to exclude from analysis.
Eg. he,she
As humans, we hold many unconscious and implicit biases that we rely on to react quickly to our environment and any novel stimuli. However, since the unconscious brain processes and reacts with speed, we sometimes speak quickly without thinking, which may cause us to slip offensive terms and stereotypes although we mean no malice.
In order to confront these biases that we see in ourselves and others, we must rewire ourselves to regularly use inclusive practices (such as the words we speak). If you don't intentionally and proactively include, you will unintentionally exclude.
Join our effort to push out exclusive terms and make inclusive terms a part of our everyday vocabulary!
Help us confront these biases by pushing out exclusive terms and making inclusive terms a part of our everyday vocabulary!
- Clone the repository
- Run
yarn install
to install all dependencies. - Run
yarn run dev
to run locally with sample data. See package.json for dev config and params.
Tip: In VSCode, open package.json, hover over 'Scripts' (line 6) and click on Debug and select Dev to interactively debug the code.
Run the following commands when you are in the /src folder. The extension packaging does not work when running from the root of the repository.
- Increment build number in
package.json
,task.json
and 'vss-extension.json' - Run
yarn run prepare
- Run
yarn run build
- Run
tfx extension create --manifest-globs vss-extension.json
- Upload the file to the VS Marketplace.
Note: If you make changes to the task.json, you might need to delete and re-install the extension on the Azure DevOps Organization to see updates.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.