Skip to content

docs: fix lint errors on docs sample code - #6745

Merged
sipsma merged 2 commits into
dagger:mainfrom
sipsma:fix-doc-lints
Feb 27, 2024
Merged

sipsma merged 2 commits into
dagger:mainfrom
sipsma:fix-doc-lints

Conversation

@sipsma

@sipsma sipsma commented Feb 26, 2024

Copy link
Copy Markdown
Contributor

There's linting errors on main right now, just including the generated code for these so we can lint them (also patched one legit linter complaint about extra whitespace in one of the files)

@sipsma sipsma added this to the v0.10.0 milestone Feb 26, 2024
@sipsma

sipsma commented Feb 26, 2024

Copy link
Copy Markdown
Contributor Author

Hm I guess this doesn't show up in PRs and only on main due to the fact that we ignore docs/** for the engine lint workflow only on PRs: https://github.com/sipsma/dagger/blob/30925fc1006ca1cacafe5424c381063cc585feab/.github/workflows/engine-and-cli.yml#L13-L13

This leads to an inconsistency in that in PRs where you don't change docs then you get lint errors about the docs, but if you only changes docs then you don't see them...

If possible, I'm inclined to just run the linting on docs/** no matter what (while still skipping the engine tests if only docs was modified). I'll push that as a separate commit, but let me know if there's some other decision we made around all this that I'm not aware of. I think it's valuable to lint these snippets if possible, so it would be my preference to keep that. cc @vikram-dagger

Before this, we ignored `docs/**` for the engine lint workflow only on PRs

This leads to an inconsistency in that in PRs where you don't change
docs then you get lint errors about the docs, but if you only changes
docs then you don't see them.

Now engine lint + test workflows are split out and we ignore docs-only
changes for the tests, but always run lints.

Signed-off-by: Erik Sipsma <[email protected]>

@vito vito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Well this nearly gave me a heart attack:
image

(would be neat if GitHub distinguished generated lines of code from these stats 😅)

Agree with linting docs/, seems like the much lesser evil to having bugs in our sample code.

@sipsma

sipsma commented Feb 27, 2024

Copy link
Copy Markdown
Contributor Author

Well this nearly gave me a heart attack:

Yes please review all 70k lines of dagger.gen.gos too plz 🙏

(would be neat if GitHub distinguished generated lines of code from these stats 😅)

💯

@sipsma
sipsma merged commit 397e06c into dagger:main Feb 27, 2024
@vikram-dagger

Copy link
Copy Markdown
Contributor

I'm not sure if related but see #6649 which turned off some tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants