Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(examples): add linting to all examples#12595

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mafredri merged 2 commits intomainfrommafredri/feat-lint-examples
Mar 14, 2024

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedMar 14, 2024
edited
Loading

This PR adds linting and validation improved validation for examples templates and matches the requirements imposed by registry.coder.com.

The improvements caught an additional issue:

❯ make lint/exampleserror: parse failed:    main.run        /Users/maf/Work/Code/coder/scripts/examplegen/main.go:87  - example "templates/incus" has errorsfront matter validation failedicon does not exist: stat examples/templates/incus/icon/lxc.svg: no such file or directoryicon is not in site/static: "/icon/lxc.svg"exit status 1

Ultimately the icon path was correct (as seen from the dashboard), but all other templates use a relative path so that we can verify the icons existence.

Here's another example after fudging up some more files:

❯ make lint/exampleserror: parse failed:    main.run        /Users/maf/Work/Code/coder/scripts/examplegen/main.go:87  - example "templates/gcp-devcontainer" has errorsfront matter validation failedtags isn't a slice: type boolexample "templates/gcp-linux" has errorsfront matter validation failedicon does not exist: stat site/static/icon/asdf.svg: no such file or directoryexample "templates/incus" has errorsfront matter validation failedfront matter does not contain "display_name"front matter does not contain "maintainer_github"icon does not exist: stat examples/templates/incus/icon/lxc.svg: no such file or directoryexit status 1

Fixes#12588

matifali reacted with hooray emoji
@mafredrimafredriforce-pushed themafredri/feat-lint-examples branch fromd461d12 tob981cf2CompareMarch 14, 2024 14:29
@mafredrimafredri marked this pull request as ready for reviewMarch 14, 2024 14:34
@@ -1,7 +1,7 @@
---
display_name: Incus System Container with Docker
description: Develop in an Incus System Container with Docker using incus
icon: /icon/lxc.svg
icon:../../../site/static/icon/lxc.svg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

😅

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

To be fair, both forms work. But all our otherexamples/templates use this relative form, and it's handy for confirming that the exact path exists.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yep, +1 for enforced consistency!

@mafredrimafredri merged commit5dd436c intomainMar 14, 2024
@mafredrimafredri deleted the mafredri/feat-lint-examples branchMarch 14, 2024 14:49
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 14, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@matifalimatifaliAwaiting requested review from matifali

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

bug: any typo in template matadata is crashing registry.coder.com deployment
2 participants
@mafredri@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp