blob: 73831c4268637924a27174e36a7eef360d83724f [file] [log] [blame]
checkstyle_source = 'src/main/resources/onos/checkstyle.xml'
suppression_source = 'src/main/resources/onos/suppressions.xml'
xml = ('<module name="SuppressionFilter">'
'<property name="file" value="$(location :suppressions.xml)"/>'
'</module>' )
cmd = "sed 's#<module name=\"Checker\">#<module name=\"Checker\">%s#' %s > $OUT" % ( xml, checkstyle_source )
genrule(
name = 'checkstyle-xml',
srcs = [ checkstyle_source ],
out = 'checkstyle.xml',
bash = cmd,
visibility = [ 'PUBLIC' ]
)
#FIXME location suppression.xml does not trigger this rule
export_file(
name = 'suppressions.xml',
src = suppression_source,
)