Skip to content

Commit

Permalink
Add PMD to prevent system printout (#12)
Browse files Browse the repository at this point in the history
* Add PMD to prevent system printout

* Add pr template

* Update pr template
  • Loading branch information
tuliren authored Dec 21, 2021
1 parent c2363f3 commit 8bb7343
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**⚠️ Please create this PR against `airbytehq/json-avro-converter` as the base repository, instead of the default `allegro/json-avro-converter`.⚠️**

## Summary

## Checklist
- [ ] Write unit tests
- [ ] Make sure there is no logging in the Json / Avro conversion code
- [ ] Update documentation in `README.md`
7 changes: 7 additions & 0 deletions converter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ plugins {
// id 'jacoco'
// https://github.com/melix/jmh-gradle-plugin#what-plugin-version-to-use
id 'me.champeau.gradle.jmh' version '0.5.3'
id 'pmd'
}

apply plugin: 'com.commercehub.gradle.plugin.avro'
Expand Down Expand Up @@ -74,3 +75,9 @@ test {
exceptionFormat 'full'
}
}

pmd {
toolVersion = "6.41.0"
ruleSetFiles = files("config/pmd.xml")
ruleSets = []
}
14 changes: 14 additions & 0 deletions converter/config/pmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>

<ruleset name="Custom Rules"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">

<description>
PMD configuration
</description>

<rule ref="category/java/bestpractices.xml/SystemPrintln" />

</ruleset>

0 comments on commit 8bb7343

Please sign in to comment.