diff options
| author | Joel Klinghed <the_jk@opera.com> | 2019-07-01 15:43:16 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@opera.com> | 2019-07-01 15:43:16 +0200 |
| commit | 30da59d1c8afe6834fc56aab9f8c96ebddd22234 (patch) | |
| tree | 005fb7f3df60321d8abb9fe8b24647029ec63327 /bin | |
| parent | 11394cedf1258b787b24bfd0a49d961856708750 (diff) | |
Support multiple jars in flycheck-android-java-checkstyle-jar
Useful for custom checks
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/flycheck-android-java.py | 7 |
1 files 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']]) |
