Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#18 Error importin a config file created with v3.5 in v4.0

closed
nobody
5
2012-09-25
2006-01-04
Alessandro
No

Hi,
I have an xml configuration file created with
Checkstyle v3.5 that is not recognized/converted with
version 4.0.1.

I do not have the checkstyle_config.xml generated with
the old version.

This is the checkstyle_config.xml in my 4.0.1
installation:

<checkstyle-configurations file-format-version="5.0.0"> <check-configuration name="alma CS" location="/diska/ home/almase/ALMAEclipseExtension/chkstyle.xml" type="external" description=""/>

In attachment there is the configuration file (in xml)
created with version 3.5.

I posted a note in the forum about this problem.

Thank's for your help,
Alessandro

Discussion

  • Alessandro
    Alessandro
    2006-01-04

    XLM configuration file created with v.3.5

     
    Attachments
  • Logged In: YES
    user_id=1238882

    Your chkstyle.xml is in the plugins old proprietary format
    and cannot be directly used anymore.

    There is an migration function built into the plugin which
    normally automatically migrate the old configuration file.

    However, there is a bug which lets the automatic migration
    choke on usage checks (these were removed from Checkstyle)
    present in the old configuration file. This will be fixed
    with with the next release.

    To import your old configuration please follow these steps:
    1. Close eclipse
    2. Download the attached checkstyle-config.xml (this is your
    chkstyle.xml file minus usage checks)
    3. Navigate to your eclipse workspace folder
    4. copy the file to the .metadata.plugins\com.atlassw.
    tools.eclipse.checkstyle folder
    5. Restart eclipse and open Window->Preferences->Checkstyle
    - The old configuration in the checkstyle-config.xml now
    should automatically be migrated - You will find an internal
    configuration with the name of your old config.

    Hope that helps,
    Lars Ködderitzsch

     
  • Alessandro
    Alessandro
    2006-01-10

    Logged In: YES
    user_id=1418351

    I have followed your suggestions and the problem has been fixed.
    I have saved the configuration in order to be able to load
    from a clean installation with the newer version. This what
    I did
    1. I make a copy of the original checkstyle_config.xml
    2. I followed your suggestion
    3. saved the internal configuration in a file
    4. closed eclipse
    5. replaced your checkstyle_config.xml with the original
    saved in step 1
    6. imported the configuration file saved in 3

    Everything seems to work now.
    I think you can close this action.

    Thank's again for your help,
    Alessandro

     
  • Logged In: YES
    user_id=1238882

    Ok, good to hear.
    Thanks for your note.

    A fix for the underlying bug was also committed to CVS and
    will be included in the next release version.

    Cheers,
    Lars