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

Fixes clippy lints #105

Merged
merged 1 commit into from
Nov 13, 2022
Merged

Fixes clippy lints #105

merged 1 commit into from
Nov 13, 2022

Conversation

Dav1dde
Copy link
Member

@Dav1dde Dav1dde commented Nov 13, 2022

Fixes clippy lints (except tests) and adds clippy to CI

Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

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

looks good!

@Dav1dde
Copy link
Member Author

Dav1dde commented Nov 13, 2022

looks good!

That was fast :D

Added the cache action for clippy as well, since it fetches the cargo index before running

@clux
Copy link
Member

clux commented Nov 13, 2022

cache action

Yeah, that's helpful. This repo is less professional than kube and could do with some more of this stuff :-)

@Dav1dde
Copy link
Member Author

Dav1dde commented Nov 13, 2022

You're using the clippy action in kube:

      - uses: actions-rs/clippy-check@v1
        with:
          args: "--workspace"
          token: ${{ secrets.GITHUB_TOKEN }}

Want me to change it here as well? I checked it out before but it looked like it does not work properly for pull requests, but I might be misunderstanding the issue.

@clux
Copy link
Member

clux commented Nov 13, 2022

I honestly don't remember what the token is for, but it seems to be required and the action is really nice, and we've not had any problems with it AFAIK. Getting the lints inlined into the PR makes them easy to identify when they are created.

Signed-off-by: David Herberth <github@dav1d.de>
@Dav1dde
Copy link
Member Author

Dav1dde commented Nov 13, 2022

Updated:

Error: Unable to create clippy annotations! Reason: HttpError: Resource not accessible by integration
Warning: It seems that this Action is executed from the forked repository.
Warning: GitHub Actions are not allowed to create Check annotations, when executed for a forked repos. See https://github.com/actions-rs/clippy-check/issues/2 for details.
Posting clippy checks here instead.

Not sure what that means, but clippy is still executed, so even in the case the action fails clippy runs which is all we need.

@clux
Copy link
Member

clux commented Nov 13, 2022

Ah, I guess it only (fully) works (to create inline annotations) if you create a PR from a branch against kube-rs origin. This should work for you since you, but not many others.

@clux
Copy link
Member

clux commented Nov 13, 2022

Let's try it out :-)

@clux clux merged commit 291905b into kube-rs:main Nov 13, 2022
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.

None yet

2 participants