Skip to content

Remove Hardcoded XML Configuration Generation #79

@Anmol202005

Description

@Anmol202005

Ref: #76 (comment)

Currently generating Checkstyle configuration XML manually using hardcoded strings:

public static void writeConfigurationToXml(CheckConfiguration config, String filePath)
        throws IOException {
    try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath))) {
        writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
        writer.write("<!DOCTYPE module PUBLIC \"-//Checkstyle//DTD Checkstyle "
                + "Configuration 1.3//EN\" \"configuration_1_3.dtd\">\n");
        writeModule(config, writer);
    }
}

Issue:

Header input files cannot contain config comments since they expect license headers as the first comment, making config extraction impossible.

Goal:

Investigate alternatives to remove hardcoded XML generation and find a cleaner approach for configuration handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions