|
@@ -13,6 +13,8 @@
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
# See the License for the specific language governing permissions and
|
|
|
# limitations under the License.
|
|
|
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
+cd "$DIR/../../.." || exit 1
|
|
|
|
|
|
FINDBUGS_ALL_FILE=./target/findbugs-all.txt
|
|
|
|
|
@@ -22,13 +24,13 @@ touch "$FINDBUGS_ALL_FILE"
|
|
|
|
|
|
mvn -B compile -fn findbugs:check -Dfindbugs.failOnError=false -f pom.ozone.xml
|
|
|
|
|
|
-find hadoop-ozone -name findbugsXml.xml | xargs -n1 convertXmlToText | tee -a "${FINDBUGS_ALL_FILE}"
|
|
|
-find hadoop-hdds -name findbugsXml.xml | xargs -n1 convertXmlToText | tee -a "${FINDBUGS_ALL_FILE}"
|
|
|
+find hadoop-ozone -name findbugsXml.xml -print0 | xargs -n1 convertXmlToText | tee -a "${FINDBUGS_ALL_FILE}"
|
|
|
+find hadoop-hdds -name findbugsXml.xml -print0 | xargs -n1 convertXmlToText | tee -a "${FINDBUGS_ALL_FILE}"
|
|
|
|
|
|
-bugs=$(cat "$FINDBUGS_ALL_FILE" | wc -l)
|
|
|
+bugs=$(wc -l < "$FINDBUGS_ALL_FILE")
|
|
|
|
|
|
if [[ ${bugs} -gt 0 ]]; then
|
|
|
- exit -1
|
|
|
+ exit 1
|
|
|
else
|
|
|
exit 0
|
|
|
fi
|