checkstyle / checkstyle/checkstyle

MetadataGeneratorUtil doesn't support custom output folder locations

Open
#10,748 0 comments 0 reactions 0 assignees View on GitHub
approved
Dominant language
Java
Stars
9.6k
Forks
4.2k
Avg merge
20h 33m
Merged PRs (30d)
234

Description

`MetadataGeneratorUtil` doesn't allow any user configuration for where to place the meta files it generates. As such they go to the base `src\main\resources` folder, and doesn't allow a custom location like checkstyle has at `src\main\resources\com\puppycrawl\tools\checkstyle\meta`.

In addition, it doesn't allow any configuration to keep XML files separated into different folders like checkstyle has with `meta\checks\annotation` and `meta\checks\blocks` as an example.

We should expand this util to be just as configurable as checkstyle allows for itself.

See https://github.com/checkstyle/checkstyle/blob/13481f2c410e4944ecf5ab93ec49948a523a0c82/src/main/java/com/puppycrawl/tools/checkstyle/meta/XmlMetaWriter.java#L160-L178 as the targeted code which give checkstyle the extra functions others don't get.

The 2nd argument can be used for the output location, just like the first argument is for the input location. We may have to switch `MetadataGeneratorUtil` to picocli for it to take optional arguments.

Contributor guide

Open the contributing guide

Research direction

Start with MetadataGeneratorUtil and compare its arguments and output handling with XmlMetaWriter.java lines 160-178, which provides the referenced configurable behavior. Done means users can select an output location and keep generated XML files in separate folders, with optional arguments if the utility is moved to picocli.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.