pmd-biased-language

PMD rules for detecting the use of racially charged or biased language

License

License

Categories

Categories

PMD Application Testing & Monitoring Code Analysis
GroupId

GroupId

com.signalfx.public
ArtifactId

ArtifactId

pmd-biased-language
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

pmd-biased-language
PMD rules for detecting the use of racially charged or biased language
Project URL

Project URL

https://github.com/signalfx/pmd-biased-language
Source Code Management

Source Code Management

https://github.com/signalfx/pmd-biased-language

Download pmd-biased-language

How to add to project

<!-- https://jarcasting.com/artifacts/com.signalfx.public/pmd-biased-language/ -->
<dependency>
    <groupId>com.signalfx.public</groupId>
    <artifactId>pmd-biased-language</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.signalfx.public/pmd-biased-language/
implementation 'com.signalfx.public:pmd-biased-language:1.0.1'
// https://jarcasting.com/artifacts/com.signalfx.public/pmd-biased-language/
implementation ("com.signalfx.public:pmd-biased-language:1.0.1")
'com.signalfx.public:pmd-biased-language:jar:1.0.1'
<dependency org="com.signalfx.public" name="pmd-biased-language" rev="1.0.1">
  <artifact name="pmd-biased-language" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.signalfx.public', module='pmd-biased-language', version='1.0.1')
)
libraryDependencies += "com.signalfx.public" % "pmd-biased-language" % "1.0.1"
[com.signalfx.public/pmd-biased-language "1.0.1"]

Dependencies

compile (2)

Group / Artifact Type Version
net.sourceforge.pmd : pmd-core jar 6.8.0
net.sourceforge.pmd : pmd-java jar 6.8.0

test (1)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar 5.6.2

Project Modules

There are no modules declared in this project.

PMD Rules for Preventing Biased Language

This repository contains a PMD RuleSet for detecting and preventing the use of racially charged or biased language in Java codebases.

How to use

With Maven

Use the maven-pmd-plugin and include this ruleset (and its dependency on the com.signalfx.public:pmd-biased-language artifact) in your plugin configuration:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-pmd-plugin</artifactId>
  <version>3.13.0</version>
  <executions>
    <execution>
      <id>pmd-test-compile</id>
      <phase>test-compile</phase>
      <goals>
        <goal>check</goal>
      </goals>
      <configuration>
      </configuration>
    </execution>
  </executions>
  <dependencies>
    <dependency>
      <groupId>com.signalfx.public</groupId>
      <artifactId>pmd-biased-language</artifactId>
      <version>1.0.1</version>
    </dependency>
  </dependencies>
  <configuration>
    <rulesets>
      <ruleset>pmd-biased-language/pmd.xml</ruleset>
    </rulesets>
    <excludeRoots>
      <excludeRoot>target/generated-sources</excludeRoot>
    </excludeRoots>
    <includeTests>true</includeTests>
    <linkXRef>false</linkXRef>
    <printFailingErrors>true</printFailingErrors>
  </configuration>
</plugin>

Rule priority

The default priority of the rules in this ruleset is 3, like most PMD rules. PMD also uses a default failurePriority of 5, meaning all rules fail your build. If you want to use this ruleset as a warning only, you can override the priority of its rules to 5:

<rule ref="pmd-biased-language/pmd.xml">
  <priority>5</priority>
</rule>

And set <failurePriority>4</failurePriority> in the configuration of your maven-pmd-plugin execution.

License

This PMD ruleset, its rule definitions, and the rule implementations that it contains, are all released under the terms of the Apache Software License 2.0.

Links

Releasing

  1. Deploy the snapshot:
    $ mvn -DperformRelease=true clean deploy
    
  2. Set the version by editing the pom.xml file
  3. Deploy the release:
    $ mvn -DperformRelease=true clean deploy -P release
    
  4. Edit the pom.xml file again to go to the next snapshot version.
com.signalfx.public

SignalFx

Versions

Version
1.0.1
1.0.0