apache / apache/beam

Use checkstyle on everything

Open
#18,211 0 comments 0 reactions 0 assignees View on GitHub
build P3 task
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

It is desirable to run checkstyle on everything, including poms.

The problem is that the checkstyle rules come from the classpath, and that you can't have a dependency at the top level on a module of the project.

There are some alternatives:

* As of Maven 3.x, the entire checkstyle rule set can be inlined in the pom. A cure worse than the disease? You decide.
* What other projects *(e.g. CXF) do is separately release an artifact with checkstyle and PMD rules. You can do that with a new github repo, or using the necessary Maven magic to have a subdirectory which is _not_ a module and contains a releasable pom. (It's all in how you configure the Maven release plugin).
* You can just arrange for the rules to be at a URL. A URL, for example, to a specific version of a specific file on github?

[~dhalperi@google.com]

Imported from Jira [BEAM-1278](https://issues.apache.org/jira/browse/BEAM-1278). Original Jira may contain additional context.
Reported by: bmargulies.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the project's Maven poms and how the current Checkstyle rules are supplied from the classpath. Decide how rules should be made available to all poms, then verify that Checkstyle runs across the full project, including the poms themselves.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.