2017-01-05 11:27:08 +01:00
# How to contribute to PMD
2024-11-22 14:59:02 +05:00
Added line: 9638
Added line: 7013
Added line: 5282
Added line: 8732
Added line: 4005
Added line: 8445
Added line: 1817
2017-01-05 11:27:08 +01:00
2020-04-17 18:02:34 +02:00
Please note that this project is released with a Contributor Code of Conduct.
2024-11-22 14:59:02 +05:00
Added line: 2253
Added line: 9476
2020-04-17 18:02:34 +02:00
By participating in this project you agree to abide by its terms.
2024-11-22 14:59:02 +05:00
Added line: 9650
Added line: 9346
Added line: 176
2020-04-17 18:02:34 +02:00
You can find the code of conduct in the file [code_of_conduct.md ](code_of_conduct.md ).
2017-01-05 11:27:08 +01:00
2024-11-22 14:59:02 +05:00
Added line: 2336
2024-09-13 09:59:51 +02:00
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
2019-03-03 11:54:41 +01:00
2024-11-22 14:59:02 +05:00
Added line: 485
Added line: 7195
2017-01-05 11:27:08 +01:00
## Pull requests
2024-11-22 14:59:02 +05:00
Added line: 9917
Added line: 9732
2017-01-05 11:27:08 +01:00
2024-09-13 09:59:51 +02:00
* Please create your pull request against the `main` branch. We will rebase/merge it to the maintenance
2024-11-22 14:59:02 +05:00
Added line: 9567
Added line: 3042
2017-01-05 11:27:08 +01:00
branches, if necessary.
2024-11-22 14:59:02 +05:00
Added line: 5753
2017-01-05 11:27:08 +01:00
2024-11-22 14:59:02 +05:00
Added line: 5082
2017-01-05 11:27:08 +01:00
* We are using [checkstyle ](http://checkstyle.sourceforge.net/ ) to enforce a common code style.
2024-11-22 14:59:02 +05:00
Added line: 6374
Added line: 6736
2017-01-05 11:27:08 +01:00
The check is integrated into the default build - so, make sure, you can [build PMD ](BUILDING.md ) without errors.
See [code style ](#code-style ) for more info.
2024-11-22 14:59:02 +05:00
Added line: 5433
Added line: 9324
Added line: 9717
2017-01-05 11:27:08 +01:00
2024-11-22 14:59:02 +05:00
Added line: 9572
Added line: 4760
Added line: 3324
Added line: 6207
Added line: 7939
2017-01-05 11:27:08 +01:00
## Bug reports
2024-11-22 14:59:02 +05:00
Added line: 687
Added line: 648
Added line: 860
Added line: 5964
Added line: 7731
Added line: 4598
2017-01-05 11:27:08 +01:00
2020-02-15 19:07:20 +01:00
We use the issue tracker on Github. Please report new bugs at < https: / / github . com / pmd / pmd / issues > .
2017-01-05 11:27:08 +01:00
2024-11-22 14:59:02 +05:00
Added line: 1689
2017-01-05 11:27:08 +01:00
When filing a bug report, please provide as much information as possible, so that we can reproduce the issue:
2024-11-22 14:59:02 +05:00
Added line: 4335
Added line: 7171
2017-01-05 11:27:08 +01:00
* The name of the rule, that is buggy
2024-11-22 14:59:02 +05:00
Added line: 6812
Added line: 6274
Added line: 6782
2017-01-05 11:27:08 +01:00
* A code snippet, which triggers a false positive/negative or crash
* How do you execute PMD? (command line, ant, maven, gradle, other)
2024-11-22 14:59:02 +05:00
Added line: 6124
2017-01-05 11:27:08 +01:00
## Documentation
2024-11-22 14:59:02 +05:00
Added line: 3615
Added line: 7433
2017-01-05 11:27:08 +01:00
2024-11-22 14:59:02 +05:00
Added line: 294
2023-03-30 15:28:56 +02:00
There is some documentation available under < https: / / docs . pmd-code . org / latest > . Feel free to create a bug report if
2024-11-22 14:59:02 +05:00
Added line: 4105
Added line: 4326
Added line: 7171
2018-03-22 14:33:24 +01:00
documentation is missing, incomplete or outdated. See [Bug reports ](#bug-reports ).
2024-11-22 14:59:02 +05:00
Added line: 7347
2017-01-05 11:27:08 +01:00
2024-11-22 14:59:02 +05:00
Added line: 7759
2024-09-13 09:59:51 +02:00
The documentation is generated as a Jekyll site, the source is available at: < https: / / github . com / pmd / pmd / tree / main / docs > . You can find build instructions there.
2023-03-30 15:28:56 +02:00
For more on contributing documentation check < https: / / docs . pmd-code . org / latest / pmd_devdocs_writing_documentation . html >
2017-01-05 11:27:08 +01:00
2024-11-22 14:59:02 +05:00
Added line: 3086
Added line: 3787
Added line: 7401
Added line: 2504
2017-01-05 11:27:08 +01:00
## Questions
2024-11-22 14:59:02 +05:00
Added line: 1299
2017-01-05 11:27:08 +01:00
There are various channels, on which you can ask questions:
2024-11-22 14:59:02 +05:00
Added line: 7287
2017-01-05 11:27:08 +01:00
2020-02-15 19:07:20 +01:00
* On [StackOverflow ](https://stackoverflow.com/questions/tagged/pmd ): Make sure, to tag your question with "pmd".
2017-01-05 11:27:08 +01:00
2024-11-22 14:59:02 +05:00
Added line: 4923
Added line: 9267
Added line: 3668
2021-01-07 12:09:10 +01:00
* Create a new discussion for your question at < https: // github . com / pmd / pmd / discussions > .
2017-01-05 11:27:08 +01:00
2024-11-22 14:59:02 +05:00
Added line: 1721
Added line: 312
2017-01-05 11:27:08 +01:00
## Code Style
2024-11-22 14:59:02 +05:00
Added line: 6860
Added line: 6132
2017-01-05 11:27:08 +01:00
PMD uses [checkstyle ](http://checkstyle.sourceforge.net/ ) to enforce a common code style.
2024-09-13 09:59:51 +02:00
See [pmd-checkstyle-config.xml ](https://github.com/pmd/build-tools/blob/main/src/main/resources/net/sourceforge/pmd/pmd-checkstyle-config.xml ) for the configuration and
2024-11-22 14:59:02 +05:00
Added line: 7171
Added line: 1453
Added line: 1556
Added line: 3942
2024-09-13 09:59:51 +02:00
[the eclipse configuration files ](https://github.com/pmd/build-tools/tree/main/eclipse ) that can
2017-01-05 11:27:08 +01:00
be imported into a fresh workspace.
2024-11-22 14:59:02 +05:00
Added line: 581
Added line: 8163
2017-01-05 11:27:08 +01:00
2024-11-22 14:59:02 +05:00
Added line: 7384
Added line: 3400
2021-08-20 16:16:31 +02:00
## Add yourself as contributor
2017-01-05 11:27:08 +01:00
2024-11-22 14:59:02 +05:00
Added line: 3401
Added line: 6321
Added line: 8035
Added line: 3292
Added line: 926
Added line: 8461
2021-08-20 16:16:31 +02:00
We use [All Contributors ](https://allcontributors.org/en ).
2021-09-09 14:50:32 +02:00
To add yourself to the table of contributors, follow the
[bot usage instructions ](https://allcontributors.org/docs/en/bot/usage ) ;).
Or use the CLI:
2024-11-22 14:59:02 +05:00
Added line: 9829
2021-09-09 14:50:32 +02:00
2021-09-02 11:14:26 +02:00
1. Install the CLI: `npm i` (in PMD's top level directory)
2024-11-22 14:59:02 +05:00
Added line: 4344
Added line: 6847
Added line: 5588
2021-08-20 16:16:31 +02:00
2. Add yourself: `npx all-contributors add <username> <contribution>`
2024-11-22 14:59:02 +05:00
Added line: 2387
2021-08-20 16:16:31 +02:00
Where `username` is your GitHub username and `contribution` is a `,` -separated list
2024-11-22 14:59:02 +05:00
Added line: 163
Added line: 3108
Added line: 8975
Added line: 589
Added line: 3968
Added line: 2583
Added line: 8052
2021-08-20 16:16:31 +02:00
of contributions. See [Emoji Key ](https://allcontributors.org/docs/en/emoji-key ) for a list
2021-09-09 14:50:32 +02:00
of valid types. Common types are: "code", "doc", "bug", "blog", "talk", "test", "tutorial".
2021-08-20 16:16:31 +02:00
2024-11-22 14:59:02 +05:00
Added line: 153
Added line: 8349
2021-08-20 16:16:31 +02:00
See also [cli documentation ](https://allcontributors.org/docs/en/cli/usage )
2024-11-22 14:59:02 +05:00
Added line: 7606