Pass checkstyle locations via arguments
Change-Id: I1dba28b48d8f62ba75a93d345f94c14b825adf93
Showing
1 changed file
with
8 additions
and
5 deletions
... | @@ -112,8 +112,8 @@ def osgi_jar( | ... | @@ -112,8 +112,8 @@ def osgi_jar( |
112 | if srcs: | 112 | if srcs: |
113 | chk_cmd = '#!/bin/bash\n' | 113 | chk_cmd = '#!/bin/bash\n' |
114 | base = get_base_path() | 114 | base = get_base_path() |
115 | - chk_cmd += ' '.join(( 'java -jar $(location //lib:checkstyle)', | 115 | + chk_cmd += ' '.join(( 'java -jar $1', |
116 | - '-c $(location //tools/build/conf:checkstyle-xml)', | 116 | + '-c $2', |
117 | ' '.join(['%s/%s' % (base, s) for s in srcs]) )) | 117 | ' '.join(['%s/%s' % (base, s) for s in srcs]) )) |
118 | chk_cmd += ' | grep -E "^[^: ]*:\d+:\d+: error:"' | 118 | chk_cmd += ' | grep -E "^[^: ]*:\d+:\d+: error:"' |
119 | chk_cmd += ' | sed "s#^.*%s/#%s:#g"\n' % (base, name) | 119 | chk_cmd += ' | sed "s#^.*%s/#%s:#g"\n' % (base, name) |
... | @@ -129,9 +129,12 @@ def osgi_jar( | ... | @@ -129,9 +129,12 @@ def osgi_jar( |
129 | sh_test( | 129 | sh_test( |
130 | name = name + '-checkstyle', | 130 | name = name + '-checkstyle', |
131 | test = ':' + name + '-checkstyle-sh', | 131 | test = ':' + name + '-checkstyle-sh', |
132 | - deps = [ ':'+ bare_jar_name, | 132 | + args = [ |
133 | - '//lib:checkstyle', | 133 | + '$(location //lib:checkstyle)', |
134 | - '//tools/build/conf:checkstyle-xml', | 134 | + '$(location //tools/build/conf:checkstyle-xml)' |
135 | + ], | ||
136 | + deps = [ | ||
137 | + ':'+ bare_jar_name, | ||
135 | '//tools/build/conf:suppressions-xml', | 138 | '//tools/build/conf:suppressions-xml', |
136 | ], | 139 | ], |
137 | labels = [ 'checkstyle' ], | 140 | labels = [ 'checkstyle' ], | ... | ... |
-
Please register or login to post a comment