Mercurial > hg > graal-jvmci-8
comparison mxtool/mx.py @ 14918:31a9c79399c8
disabled current Checkstyle configurations (until Checkstyle supports Java8)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 01 Apr 2014 18:51:14 +0200 |
parents | 3e06a56ab0e6 |
children | 3de340bdb8d3 |
comparison
equal
deleted
inserted
replaced
14917:3e06a56ab0e6 | 14918:31a9c79399c8 |
---|---|
2370 totalErrors = 0 | 2370 totalErrors = 0 |
2371 for p in projects_opt_limit_to_suites(): | 2371 for p in projects_opt_limit_to_suites(): |
2372 if p.native: | 2372 if p.native: |
2373 continue | 2373 continue |
2374 sourceDirs = p.source_dirs() | 2374 sourceDirs = p.source_dirs() |
2375 dotCheckstyle = join(p.dir, '.checkstyle') | 2375 |
2376 | 2376 csConfig = join(p.dir, '.checkstyle_checks.xml') |
2377 if not exists(dotCheckstyle): | 2377 if not exists(csConfig): |
2378 abort('ERROR: .checkstyle for Project {0} is missing'.format(p.name)) | 2378 abort('ERROR: Checkstyle configuration for project {} is missing: {}'.format(p.name, csConfig)) |
2379 | 2379 |
2380 # skip checking this Java project if its Java compliance level is "higher" than the configured JDK | 2380 # skip checking this Java project if its Java compliance level is "higher" than the configured JDK |
2381 jdk = java(p.javaCompliance) | 2381 jdk = java(p.javaCompliance) |
2382 if not jdk: | 2382 if not jdk: |
2383 log('Excluding {0} from checking (Java compliance level {1} required)'.format(p.name, p.javaCompliance)) | 2383 log('Excluding {0} from checking (Java compliance level {1} required)'.format(p.name, p.javaCompliance)) |
2401 if not mustCheck: | 2401 if not mustCheck: |
2402 if _opts.verbose: | 2402 if _opts.verbose: |
2403 log('[all Java sources in {0} already checked - skipping]'.format(sourceDir)) | 2403 log('[all Java sources in {0} already checked - skipping]'.format(sourceDir)) |
2404 continue | 2404 continue |
2405 | 2405 |
2406 dotCheckstyleXML = xml.dom.minidom.parse(dotCheckstyle) | 2406 dotCheckstyleXML = xml.dom.minidom.parse(csConfig) |
2407 localCheckConfig = dotCheckstyleXML.getElementsByTagName('local-check-config')[0] | 2407 localCheckConfig = dotCheckstyleXML.getElementsByTagName('local-check-config')[0] |
2408 configLocation = localCheckConfig.getAttribute('location') | 2408 configLocation = localCheckConfig.getAttribute('location') |
2409 configType = localCheckConfig.getAttribute('type') | 2409 configType = localCheckConfig.getAttribute('type') |
2410 if configType == 'project': | 2410 if configType == 'project': |
2411 # Eclipse plugin "Project Relative Configuration" format: | 2411 # Eclipse plugin "Project Relative Configuration" format: |
2899 out.close('filter') | 2899 out.close('filter') |
2900 | 2900 |
2901 out.close('fileset-config') | 2901 out.close('fileset-config') |
2902 update_file(dotCheckstyle, out.xml(indent=' ', newl='\n')) | 2902 update_file(dotCheckstyle, out.xml(indent=' ', newl='\n')) |
2903 files.append(dotCheckstyle) | 2903 files.append(dotCheckstyle) |
2904 else: | |
2905 # clean up existing .checkstyle file | |
2906 dotCheckstyle = join(p.dir, ".checkstyle") | |
2907 if exists(dotCheckstyle): | |
2908 os.unlink(dotCheckstyle) | |
2904 | 2909 |
2905 out = XMLDoc() | 2910 out = XMLDoc() |
2906 out.open('projectDescription') | 2911 out.open('projectDescription') |
2907 out.element('name', data=p.name) | 2912 out.element('name', data=p.name) |
2908 out.element('comment', data='') | 2913 out.element('comment', data='') |
3546 | 3551 |
3547 shutil.rmtree(join(p.dir, '.settings'), ignore_errors=True) | 3552 shutil.rmtree(join(p.dir, '.settings'), ignore_errors=True) |
3548 shutil.rmtree(join(p.dir, '.externalToolBuilders'), ignore_errors=True) | 3553 shutil.rmtree(join(p.dir, '.externalToolBuilders'), ignore_errors=True) |
3549 shutil.rmtree(join(p.dir, 'nbproject'), ignore_errors=True) | 3554 shutil.rmtree(join(p.dir, 'nbproject'), ignore_errors=True) |
3550 rm(join(p.dir, '.classpath')) | 3555 rm(join(p.dir, '.classpath')) |
3556 rm(join(p.dir, '.checkstyle')) | |
3551 rm(join(p.dir, '.project')) | 3557 rm(join(p.dir, '.project')) |
3552 rm(join(p.dir, '.factorypath')) | 3558 rm(join(p.dir, '.factorypath')) |
3553 rm(join(p.dir, 'build.xml')) | 3559 rm(join(p.dir, 'build.xml')) |
3554 rm(join(p.dir, 'eclipse-build.xml')) | 3560 rm(join(p.dir, 'eclipse-build.xml')) |
3555 try: | 3561 try: |