From 8bb7343986ca121086e606e8d2bc88adc80b0e31 Mon Sep 17 00:00:00 2001 From: LiRen Tu Date: Mon, 20 Dec 2021 16:50:25 -0800 Subject: [PATCH] Add PMD to prevent system printout (#12) * Add PMD to prevent system printout * Add pr template * Update pr template --- .github/pull_request_template.md | 8 ++++++++ converter/build.gradle | 7 +++++++ converter/config/pmd.xml | 14 ++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 .github/pull_request_template.md create mode 100644 converter/config/pmd.xml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..bf12e99 --- /dev/null +++ b/.github/pull_request_template.md @@ -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` diff --git a/converter/build.gradle b/converter/build.gradle index d4ab8ce..274458e 100644 --- a/converter/build.gradle +++ b/converter/build.gradle @@ -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' @@ -74,3 +75,9 @@ test { exceptionFormat 'full' } } + +pmd { + toolVersion = "6.41.0" + ruleSetFiles = files("config/pmd.xml") + ruleSets = [] +} diff --git a/converter/config/pmd.xml b/converter/config/pmd.xml new file mode 100644 index 0000000..f2569c1 --- /dev/null +++ b/converter/config/pmd.xml @@ -0,0 +1,14 @@ + + + + + + PMD configuration + + + + +