Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance config linter #276

Closed
5 of 7 tasks
anbraten opened this issue Aug 23, 2021 · 4 comments
Closed
5 of 7 tasks

Enhance config linter #276

anbraten opened this issue Aug 23, 2021 · 4 comments
Labels
cli server summary it's a summary for lot of issues ui frontend related

Comments

@anbraten
Copy link
Member

anbraten commented Aug 23, 2021

Woodpecker should properly lint and evaluate the ci file/files and show errors with the specific position to users.

With #89 we could show the errors at their specific position in the config. Maybe somehow like:

Screenshot from 2021-08-24 00-53-36

@anbraten anbraten added enhancement improve existing features ui frontend related labels Sep 16, 2021
6543 added a commit that referenced this issue Sep 27, 2021
- Add json schema file
- Add tests to validate sample pipeline files
- Add new command `lint` to cli to test a directory or single file to use correct schema

Example:  `woodpecker-cli lint ./pipeline/schema/.woodpecker/`

---
close #275 
preparation for #276 


Co-authored-by: 6543 <6543@obermui.de>
@anbraten anbraten added this to the 0.16.0 milestone Oct 13, 2021
@6543
Copy link
Member

6543 commented Sep 1, 2022

@anbraten would it help if we just add an endpoint, where you can send config in body and get lint error in return?

@anbraten
Copy link
Member Author

anbraten commented Sep 1, 2022

There are a few things I had in mind:

  • lint every pipeline config before executing with json schema (currently only some checks)
  • show json schema errors of executed pipelines in UI by highlighting the wrong part
  • add endpoint to be able to paste in config code and highlight the result in UI => Expose schema linter to UI #892
  • add cli command to execute pipeline linter (currently only json schema check)
  • add way to let linter return warnings like deprecations / bad habits Warn users for bad-habits and deprecations in configs #922

@x80486
Copy link

x80486 commented Sep 1, 2022

anbraten would it help if we just add an endpoint, where you can send config in body and get lint error in return?

I think along with some integration in the UI will do it. It's always great to double check the config before pushing any related changes.

@6543
Copy link
Member

6543 commented Oct 18, 2022

@anbraten anbraten changed the title Lint woodpecker ci file(s) Enhance config linters / checkers Nov 26, 2022
@anbraten anbraten mentioned this issue Nov 26, 2022
31 tasks
@anbraten anbraten added summary it's a summary for lot of issues cli server and removed enhancement improve existing features labels Nov 26, 2022
@6543 6543 modified the milestones: 1.0.0, 1.1.0 May 31, 2023
@pat-s pat-s modified the milestones: 2.0.0, 2.x.x Oct 13, 2023
@anbraten anbraten changed the title Enhance config linters / checkers Enhance config linter Nov 4, 2023
@qwerty287 qwerty287 removed this from the 3.x.x milestone Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli server summary it's a summary for lot of issues ui frontend related
Projects
None yet
Development

No branches or pull requests

5 participants