apache / apache/maven-checkstyle-plugin
[MCHECKSTYLE-343] Default property expansions
- Dominant language
- Java
- Stars
- 97
- Forks
- 67
- Avg merge
- 14h 50m
- Merged PRs (30d)
- 6
Description
**[Andy Feldman](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=andyf-wealthfront)** opened **[MCHECKSTYLE-343](https://issues.apache.org/jira/browse/MCHECKSTYLE-343?redirect=false)** and commented
The Checkstyle plugins for Eclipse and IntelliJ IDEA both define a few default properties that are accessible in Checkstyle configuration, like the custom property expansions that can be defined by the Maven plugin (https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/custom-property-expansion.html). Those two plugins have standardized on the same variables, which lets our dev team share one configuration file without any custom configuration for the two IDE plugins.
Would it be possible for the Maven plugin to pass the same default values to Checkstyle, so that we wouldn't need to define them in each project's pom.xml?
From Eclipse-CS:
```
Built-in properties
First there are some properties that are automatically expanded by the plug-in:
${basedir} & ${project_loc} - gets mapped to the current project directory
${workspace_loc} - gets mapped to the current Eclipse workspace directory
${config_loc} & ${samedir} - get mapped to the directory the configuration file lies in
```
From CheckStyle-IDEA:
```
Eclipse-CS Variable Support
The following variables will be available if you have not otherwise overridden their values:
basedir - mapped to the location of the current module file, or the project directory as a fallback.
project_loc, workspace_loc - mapped to the project directory.
config_loc, samedir - mapped to the directory the rules file is in, or the project directory for remote rules files (e.g. HTTP).
```
---
No further details from [MCHECKSTYLE-343](https://issues.apache.org/jira/browse/MCHECKSTYLE-343?redirect=false)
Contributor guide
No contributing guide indexed for this repository
Research direction
No source file or test is identified in the issue. Start by tracing how the Maven plugin passes custom property expansions to Checkstyle and compare that behavior with the listed Eclipse-CS and CheckStyle-IDEA variables. Done means the Maven plugin provides the requested default values without requiring each project's pom.xml to define them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100