From 098e30ffdfc4d76c37806a3c73505eb48d038642 Mon Sep 17 00:00:00 2001 From: Tomas Bjerre Date: Sun, 6 Mar 2016 14:07:08 +0100 Subject: [PATCH] PerlCritic and XMLLint --- .travis.yml | 2 ++ build.sh | 8 ++++++++ perl/example.pl | 9 +++++++++ xml/myxml.xml | 3 +++ xml/other.xml | 6 ++++++ 5 files changed, 28 insertions(+) create mode 100644 perl/example.pl create mode 100644 xml/myxml.xml create mode 100644 xml/other.xml diff --git a/.travis.yml b/.travis.yml index 74aa037..fcefad3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,10 @@ jdk: - oraclejdk7 before_install: - sudo apt-get install cppcheck + - sudo apt-get install libperl-critic-perl - sudo pip install flake8 - sudo pip install cpplint + - sudo apt-get install libxml2-utils #xmllint before_script: - npm install script: diff --git a/build.sh b/build.sh index 7a37818..9cd0a72 100755 --- a/build.sh +++ b/build.sh @@ -18,5 +18,13 @@ mkdir -p build/reports/lint mkdir -p build/reports/cpplint cpplint cpp/test.cpp > build/reports/cpplint/cpplint.txt 2>&1 +#xmllint +mkdir -p build/reports/xmllint +xmllint xml/myxml.xml xml/* > build/reports/xmllint/xmllint.txt 2>&1 + #Flake8 flake8 python/project/file.py > build/flake8_2.txt + +#PerlCritic +mkdir -p build/reports/perlcritic +perlcritic --verbose 5 perl/example.pl --brutal > build/reports/perlcritic/perlcritic.txt 2>&1 diff --git a/perl/example.pl b/perl/example.pl new file mode 100644 index 0000000..7049e4a --- /dev/null +++ b/perl/example.pl @@ -0,0 +1,9 @@ +use strict; +use warnings; + +while (my $file = $dir->next) { + thisisnotused = 2; +asdasdasdasd + next if $file->is_dir(); + print $file->stringify . "\n"; +} diff --git a/xml/myxml.xml b/xml/myxml.xml new file mode 100644 index 0000000..47bfc52 --- /dev/null +++ b/xml/myxml.xml @@ -0,0 +1,3 @@ + + + diff --git a/xml/other.xml b/xml/other.xml new file mode 100644 index 0000000..602c2e6 --- /dev/null +++ b/xml/other.xml @@ -0,0 +1,6 @@ + + + + + +