Skip to content
Plugin that removes comments from source files for a list of programming languages.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Comments Remover Jenkins plugin

This plugin removes comments from source files for a number of programming languages. Required Python 3.6 on Jenkins server. A new build step is added: 'Invoke Comments Remover' which accepts files to process as input and creates uncommented version of them.

User can specify Python path in global settings for the plugin (otherwise the one on the system PATH is used).


Daniel Dyląg

For users

Global settings

Go to Manage Jenkins -> Configure System to access them




There is help section to provide examples:



The plugin can be used wherever build steps can be defined, e.g. Freestyle project


Adding build step:


build step

This part also has "help" section:

build step help

Example of build output and result:

build output

build result

build result

Using as a shell/batch command script

Alternatively, user can create plain script build step (Execute shell or Execute Windows batch command) and run Python script manually.

shell step

Comments Remover script is unpacked to JENKINS_HOME directory (which is available in script as environmental variable)

shell step output

If you use Jenkins Struct Plugin, this plugin has a shorthand defined: commentsremover.

For contributors

Updating plugin with a new version of Comments Remover

Create ZIP archive of all files required to run Comments Remover - in particular, and requirements.txt. Put it in src/main/resources. The plugin expects to find and requirement.txt on the top lever of the archive.


mvnDebug hpi:run

You can attach Java Debugger to a local Java process of Jenkins.

Prepare plugin for distribution

mvn package

The *.hpi file will be created in target/ directory. To install manually on local Jenkins, copy it to $JENKINS_HOME/plugins directory.

Releasing new version to Jenkins Update Center

mvn release:prepare release:perform

Follow the instructions to assign new version number.

You must have an account on with commit rights, and its credentials configured in maven settings:


More info here:

You can’t perform that action at this time.