Skip to content

How to update to a new Checkstyle core version

Roman Ivanov edited this page Nov 4, 2019 · 11 revisions

This page describes how to update eclipse-cs to use a new Checkstyle core version.

Preconditions

  • eclipse-cs Git repo is cloned
  • eclipse-cs projects are imported into an Eclipse workspace (PDE recommended)
  • project can be built locally with Maven

Upgrade procedure

Download of JARs

  1. Download latest checkstyle-X.X-all.jar from Checkstyle release page.
  2. Download matching Checkstyle sources zip: checkstyle-checkstyle-X.X.zip.
  3. Copy both files to <eclipse-cs-repo-dir>/net.sf.eclipsecs.checkstyle.

Update bundle

  1. Update OSGI manifest (bundle classpath) net.sf.eclipsecs.checkstyle/META-INF/MANIFEST.MF to reference the new checkstyle-X.X-all.jar.
  2. Update the net.sf.eclipsecs.checkstyle/.classpath by adding the checkstyle-checkstyle-X.X.zip as source attachment to the checkstyle-X.X-all.jar.
  3. Update the net.sf.eclipsecs.checkstyle/build.properties to include the new checkstyle-X.X-all.jar.
  4. Remove the old checkstyle-X.X-all.jar and checkstyle-checkstyle-X.X.zip.
  5. Check projects net.sf.eclipsecs.core and net.sf.eclipsecs.ui for compile errors due to potential Checkstyle API changes. Make required changes if necessary.

Update meta data

  1. Open Checkstyle Release Notes in webbrowser, and check all listed changes between the previously used Checkstyle version and the new version for changes relevant to eclipse-cs metadata.
  2. Update the eclipse-cs metadata in <eclipse-cs-repo-dir>/net.sf.eclipsecs.checkstyle/metadata. The metadata is used by the eclipse-cs configuration editor to configure all available checks and their potential options via UI.
  3. Requires PDE: Start a runtime workspace (a new eclipse workspace using the eclipse-cs plugin projects) and test the changes. (TODO!!!: explain how exactly to do this, I do not know now)