-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Format source code with spotless, add contributing guide
jenkinsci/plugin-pom#733 describes the benefits of automated source code formatting and how automated source code formatting is now provided by the Jenkins plugin POM.
- Loading branch information
1 parent
2b3c215
commit 0ae22fd
Showing
9 changed files
with
1,330 additions
and
1,261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Contributing to the plugin | ||
|
||
Plugin source code is hosted on [GitHub](https://github.com/jenkinsci/apache-httpcomponents-client-4-api-plugin). | ||
New feature proposals and bug fix proposals should be submitted as | ||
[GitHub pull requests](https://help.github.com/articles/creating-a-pull-request). | ||
Your pull request will be evaluated by the [Jenkins job](https://ci.jenkins.io/job/Plugins/job/apache-httpcomponents-client-4-api-plugin/). | ||
|
||
Before submitting your change, please assure that you've added tests which verify your change. | ||
|
||
## Code formatting | ||
|
||
Source code and pom file formatting is maintained by the `spotless` maven plugin. | ||
Before submitting a pull request, confirm the formatting is correct with: | ||
|
||
* `mvn spotless:apply` | ||
|
||
## Code Coverage | ||
|
||
[JaCoCo code coverage](https://www.jacoco.org/jacoco/) reporting is available as a maven target and can be displayed by the [Jenkins warnings next generation plugin](https://plugins.jenkins.io/warnings-ng/). | ||
Please try to improve code coverage with tests when you submit. | ||
* `mvn -P enable-jacoco clean install jacoco:report` to report code coverage with JaCoCo. | ||
|
||
Please don't introduce new spotbugs output. | ||
* `mvn spotbugs:check` to analyze project using [Spotbugs](https://spotbugs.github.io) | ||
* `mvn spotbugs:gui` to review report using GUI | ||
|
||
### Reviewing code coverage | ||
|
||
The code coverage report is a set of HTML files that show methods and lines executed. | ||
The following commands will open the `index.html` file in the browser. | ||
|
||
* Windows - `start target\site\jacoco\index.html` | ||
* Linux - `xdg-open target/site/jacoco/index.html` | ||
* Gitpod - `cd target/site/jacoco && python -m http.server 8000` | ||
|
||
The file will have a list of package names. | ||
Click on them to find a list of class names. | ||
|
||
The lines of the code will be covered in three different colors, red, green, and orange. | ||
Red lines are not covered in the tests. | ||
Green lines are covered with tests. | ||
|
||
## Maintaining automated tests | ||
|
||
Automated tests are run as part of the `verify` phase. | ||
Run automated tests with multiple Java virtual machines in a development environment with the command: | ||
|
||
``` | ||
$ mvn clean -DforkCount=1C verify | ||
``` | ||
|
||
## Report an Issue | ||
|
||
Use the ["Report an issue" page](https://www.jenkins.io/participate/report-issue/redirect/#23052) to submit bug reports. | ||
Please use the link:https://www.jenkins.io/participate/report-issue/["How to Report an Issue"] guidelines when reporting issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
|
@@ -6,98 +7,99 @@ | |
<version>4.76</version> | ||
<relativePath /> | ||
</parent> | ||
<groupId>org.jvnet.hudson.plugins</groupId> | ||
<artifactId>groovy-postbuild</artifactId> | ||
<version>2.6-SNAPSHOT</version> | ||
<packaging>hpi</packaging> | ||
|
||
<name>Groovy Postbuild</name> | ||
<groupId>org.jvnet.hudson.plugins</groupId> | ||
<artifactId>groovy-postbuild</artifactId> | ||
<version>2.6-SNAPSHOT</version> | ||
<packaging>hpi</packaging> | ||
<url>https://wiki.jenkins.io/display/JENKINS/Groovy+Postbuild+Plugin</url> | ||
<name>Groovy Postbuild</name> | ||
<url>https://wiki.jenkins.io/display/JENKINS/Groovy+Postbuild+Plugin</url> | ||
|
||
<developers> | ||
<developer> | ||
<id>wolfs</id> | ||
<name>Stefan Wolf</name> | ||
</developer> | ||
<developer> | ||
<id>beryx</id> | ||
<name>Serban Iordache</name> | ||
</developer> | ||
</developers> | ||
<licenses> | ||
<license> | ||
<name>The MIT license</name> | ||
<url>https://opensource.org/licenses/MIT</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
|
||
<licenses> | ||
<license> | ||
<name>The MIT license</name> | ||
<url>https://opensource.org/licenses/MIT</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
|
||
<properties> | ||
<jenkins.version>2.361.4</jenkins.version> | ||
</properties> | ||
<developers> | ||
<developer> | ||
<id>markewaite</id> | ||
<name>Mark Waite</name> | ||
<email>[email protected]</email> | ||
<roles> | ||
<role>developer</role> | ||
</roles> | ||
</developer> | ||
</developers> | ||
|
||
<scm> | ||
<connection>scm:git:https://github.com/jenkinsci/groovy-postbuild-plugin.git</connection> | ||
<developerConnection>scm:git:[email protected]:jenkinsci/groovy-postbuild-plugin.git</developerConnection> | ||
<url>https://github.com/jenkinsci/groovy-postbuild-plugin</url> | ||
<tag>HEAD</tag> | ||
<url>https://github.com/jenkinsci/groovy-postbuild-plugin</url> | ||
</scm> | ||
|
||
<properties> | ||
<jenkins.version>2.361.4</jenkins.version> | ||
<spotless.check.skip>false</spotless.check.skip> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.jenkins.tools.bom</groupId> | ||
<artifactId>bom-2.361.x</artifactId> | ||
<version>2102.v854b_fec19c92</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>badge</artifactId> | ||
<version>1.9.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>matrix-project</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>script-security</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins.workflow</groupId> | ||
<artifactId>workflow-cps</artifactId> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins.workflow</groupId> | ||
<artifactId>workflow-basic-steps</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins.workflow</groupId> | ||
<artifactId>workflow-job</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<repositories> | ||
<repository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>https://repo.jenkins-ci.org/public/</url> | ||
</repository> | ||
</repositories> | ||
|
||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>https://repo.jenkins-ci.org/public/</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.jenkins.tools.bom</groupId> | ||
<artifactId>bom-2.361.x</artifactId> | ||
<version>2102.v854b_fec19c92</version> | ||
<scope>import</scope> | ||
<type>pom</type> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>badge</artifactId> | ||
<version>1.9.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>matrix-project</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>script-security</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins.workflow</groupId> | ||
<artifactId>workflow-cps</artifactId> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins.workflow</groupId> | ||
<artifactId>workflow-job</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins.workflow</groupId> | ||
<artifactId>workflow-basic-steps</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> | ||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>https://repo.jenkins-ci.org/public/</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.