conedevelopment / cone-site

The new 11ty-based portfolio website of Cone.
https://conedevelopment.com
3 stars 2 forks source link

Add yamllint to test.yml #16

Closed szepeviktor closed 10 months ago

szepeviktor commented 10 months ago

Extra bonus 🎁 indentation.

From https://github.com/conedevelopment/cone-site/pull/14#issuecomment-1697266260

netlify[bot] commented 10 months ago

Deploy Preview for cone-development-site ready!

Name Link
Latest commit 0b920bfa4e85746bad8e360d1f061ca00e29ffb4
Latest deploy log https://app.netlify.com/sites/cone-development-site/deploys/64edda441870230008b2265b
Deploy Preview https://deploy-preview-16--cone-development-site.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

szepeviktor commented 10 months ago

We need 2 jobs as npm ci adds a lot of files.

adamlaki commented 10 months ago

Thank you Viktor!

adamlaki commented 10 months ago

Can the yamllint give back better error message?

image

szepeviktor commented 10 months ago

Can the yamllint give

It adds GitHub Annotation. See the diffs! e.g. https://github.com/conedevelopment/cone-site/pull/16/files

Actually all proper tools add annotations.

szepeviktor commented 10 months ago

on needs a disable-line

on:  # yamllint disable-line rule:truthy
szepeviktor commented 10 months ago

It is beneficial to work in PR-s. Even if you work alone.

adamlaki commented 10 months ago

Okay, thank you!

I start to lost my love for yamllint. Can I specify that I only want to validate in my front-matter (between ---)?

adamlaki commented 10 months ago

@szepeviktor So, the only thing that we can enable here is the indentation but for that the editor config is enough (as I see). This breaks at to many places: https://github.com/conedevelopment/cone-site/actions/runs/6012076151/job/16306722133

Places that I can't or won't fix.

szepeviktor commented 10 months ago

Sad news https://github.com/adrienverge/yamllint/issues/161

Could you take a look at yq? Can it extract Front Matter only?

adamlaki commented 10 months ago

No, I couldn't find anything. It seems that just with the config file you can't.

szepeviktor commented 10 months ago

Okay. I will research how yq can extract Front Matter from Markdown documents. https://mikefarah.gitbook.io/yq/usage/front-matter