Mercurial > hg > graal-jvmci-8
diff mxtool/mx.py @ 18163:c88ab4f1f04a
re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 24 Oct 2014 16:18:10 +0200 |
parents | 31ad929e1afd |
children | a4ab0b87fb34 |
line wrap: on
line diff
--- a/mxtool/mx.py Thu Oct 23 17:20:10 2014 +0200 +++ b/mxtool/mx.py Fri Oct 24 16:18:10 2014 +0200 @@ -3146,9 +3146,10 @@ continue sourceDirs = p.source_dirs() - csConfig = join(p.dir, '.checkstyle_checks.xml') - if not exists(csConfig): - abort('ERROR: Checkstyle configuration for project {} is missing: {}'.format(p.name, csConfig)) + config = join(project(p.checkstyleProj).dir, '.checkstyle_checks.xml') + if not exists(config): + logv('[No Checkstyle configuration foudn for {0} - skipping]'.format(p)) + continue # skip checking this Java project if its Java compliance level is "higher" than the configured JDK jdk = java(p.javaCompliance) @@ -3174,26 +3175,7 @@ log('[all Java sources in {0} already checked - skipping]'.format(sourceDir)) continue - dotCheckstyleXML = xml.dom.minidom.parse(csConfig) - localCheckConfig = dotCheckstyleXML.getElementsByTagName('local-check-config')[0] - configLocation = localCheckConfig.getAttribute('location') - configType = localCheckConfig.getAttribute('type') - if configType == 'project': - # Eclipse plugin "Project Relative Configuration" format: - # - # '/<project_name>/<suffix>' - # - if configLocation.startswith('/'): - name, _, suffix = configLocation.lstrip('/').partition('/') - config = join(project(name).dir, suffix) - else: - config = join(p.dir, configLocation) - else: - logv('[unknown Checkstyle configuration type "' + configType + '" in {0} - skipping]'.format(sourceDir)) - continue - exclude = join(p.dir, '.checkstyle.exclude') - if exists(exclude): with open(exclude) as f: # Convert patterns to OS separators