I want to format Jenkinsfile locally and understand if they are any formatting issues. I use sublime editor for editing. Is there a better editor which can also suggest me any formatting errors? I do not want to use any online formatting tools.
Asked
Active
Viewed 2.4k times
7
-
You can use Visual Studio Code with the Jenkins Pipeline Linter Connector plugin to format as well as [validate Jenkinsfile locally from within VS Code](https://jenkins.io/blog/2018/11/07/Validate-Jenkinsfile/). – Dibakar Aditya Nov 01 '19 at 00:56
-
2I tried this out and very good with the linting, I however cannot see how to use it to format the jenkinsfile – Thulani Chivandikwa Dec 17 '19 at 08:42
1 Answers
4
IntelliJ can be configured to parse Jenkinsfile as a regular Groovy file, as explained in this question or this article. This allows to use standard Groovy formatting and syntax check.
However, you might want to consider using Replay Pipeline functionality in your Jenkins instance instead.

Karol Dowbecki
- 43,645
- 9
- 78
- 111