From 30da59d1c8afe6834fc56aab9f8c96ebddd22234 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 1 Jul 2019 15:43:16 +0200 Subject: Support multiple jars in flycheck-android-java-checkstyle-jar Useful for custom checks --- bin/flycheck-android-java.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/flycheck-android-java.py b/bin/flycheck-android-java.py index 4919c52..4194049 100644 --- a/bin/flycheck-android-java.py +++ b/bin/flycheck-android-java.py @@ -259,8 +259,11 @@ def figure_out_java_compilation(sessiondir, sourcefile, tempfile, checkstyle, compiled = True if not ret and checkstyle: - cmd = ['java', '-jar', - os.path.abspath(os.path.join(projectdir, checkstyle['jar']))] + cmd = ['java'] + if ':' in checkstyle['jar']: + cmd.extend(['-cp', ':'.join(os.path.abspath(os.path.join(projectdir, jar)) for jar in checkstyle['jar'].split(':')), 'com.puppycrawl.tools.checkstyle.Main']) + else: + cmd.extend(['-jar', os.path.abspath(os.path.join(projectdir, checkstyle['jar']))]) if 'config' in checkstyle: cmd.extend(['-c', checkstyle['config']]) -- cgit v1.2.3-70-g09d2