Ability to perform CI lint from local environment (more than API)

Hi, I would like to propose a feature - may be you already have the solution but this is how it looks now for me

Problem to solve

During developing new CI procedure or making some changes very often it shows ok in IDE like VS Code, but after deployment pipeline doesn't start and we have some error. So what we do next usually - we go to CI lint page and trying to fix it there and then copy fixed version to the editor back. Meanwhile I noticed that we already have API https://docs.gitlab.com/ee/api/lint.html which may help us to lint the file right from the local ide

Right now though there are no clear guidelines how to make it except custom rule implementation. However here can be several possible improvements:

  • Create VS Code extension to be able to lint gitlab-ci.yml files from the IDE (preferred for me). Similar to GitLab Workflow extension
  • of course many people use other IDE's so more generic solution might needed. It could be nice to have just a custom eslint rule which will operate requests to GitLab server with a token from the settings
  • It may also work if we have a separate CLI for that like: gitlab ci lint which can accept host and token as input parameters or just use some config like .gitlabrc
  • one more way to think about is push option -ci.lint which may lint CI yml first and return error on push if it's broken

Of course this is just an idea - but that can really help to speed up on new CI/CD rollout because right now it's quite challenging.

Thank you!

Edited by Petr Plenkov