linter-jenkins

Jenkinsfile lint via declarative linter

mschuchard

24,328

11

Bug Reports

1.0.7

MIT

GitHub

This package provides the following services:

Preview

Linter-Jenkins

Build Status

Linter-Jenkins aims to provide functional and robust declarative-linter linting functionality within Atom. This will lint your Jenkinsfiles using declarative syntax.

Installation

A Jenkins server with the jenkins-pipeline plugin installed is required to be accessible. If one is not available in your network, then it is recommended to stand up a portable server instance with Vagrant or Docker as both will work fine with this. The Linter and Language-Jenkinsfile or Language-Groovy Atom packages are also required. Additional requirements depend upon your usage method (see below).

Usage Methods

Debug

When you select Debug Mode from the package settings, the raw command used for linting will be output as info to the linter display in Atom. This is helpful for debugging whether your connection to the Jenkins Pipeline plugin is functioning. Note that CLI and SSH methods pipe in the Jenkinsfile content to stdin, which is represented as < /path/to/Jenkinsfile in the debug display. This might not necessarily be accurate for your OS.

Note

Due to some incompatibility between the Jenkins Pipeline Validator and Atom and/or its packages, a bug was introduced such that if there is a ; in the comments of a Jenkinsfile, then the linter information will not display. Also, usage of a ; in the code (even within a String) will cause false errors. Please refrain from ; in your Jenkinsfile until Atom and/or Jenkins fixes the bug.