Fix from Brian for checkstyle rule with no sources
Change-Id: I37a85b38b61d9b008dc3456345bbd9ded6718281
Showing
1 changed file
with
3 additions
and
0 deletions
... | @@ -109,6 +109,7 @@ def osgi_jar( | ... | @@ -109,6 +109,7 @@ def osgi_jar( |
109 | ) | 109 | ) |
110 | 110 | ||
111 | ### Checkstyle | 111 | ### Checkstyle |
112 | + if srcs: | ||
112 | chk_cmd = '#!/bin/sh\n' | 113 | chk_cmd = '#!/bin/sh\n' |
113 | base = get_base_path() | 114 | base = get_base_path() |
114 | chk_cmd += ' '.join(( 'java -jar $(location //lib:checkstyle)', | 115 | chk_cmd += ' '.join(( 'java -jar $(location //lib:checkstyle)', |
... | @@ -130,6 +131,8 @@ def osgi_jar( | ... | @@ -130,6 +131,8 @@ def osgi_jar( |
130 | deps = [ ':'+ bare_jar_name ], | 131 | deps = [ ':'+ bare_jar_name ], |
131 | labels = [ 'checkstyle' ], | 132 | labels = [ 'checkstyle' ], |
132 | ) | 133 | ) |
134 | + else: | ||
135 | + print 'Not generating checkstyle rule for %s because there are no sources.' % name | ||
133 | 136 | ||
134 | # TODO add project config for intellij | 137 | # TODO add project config for intellij |
135 | # project_config( | 138 | # project_config( | ... | ... |
-
Please register or login to post a comment