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

--offline avoids github tests (no internet); clone depth 1 #183

Closed
wants to merge 2 commits into from

Conversation

WillForan
Copy link
Contributor

I was traveling and noticed awesome-lint was very slow without access to github.com.

I'm sure that's an unusual use case, so maybe it's not worth a dedicated CLI. But in case otherwise, here's the change that I think would avoid needing internet access.

@sindresorhus
Copy link
Owner

Would be better to add a timeout for the slow operation.

@WillForan
Copy link
Contributor Author

timeout seems like a good general solution. 2 implementation questions:

  1. is there an good way to send/inject a configurable timeout setting into the github (or any other) rule? Or a better place to watch for timeouts?
  2. after timeout, should there still be a github error in lint messages? Not if timeout==0?

@sindresorhus
Copy link
Owner

  1. I was not thinking of a configurable timeout, just make a hard-coded timeout with a sensible value.
  2. Only if a URL was specified.

index.js Outdated Show resolved Hide resolved
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
@WillForan
Copy link
Contributor Author

WillForan commented Jan 1, 2024

I think the default behavior is to time out already! I just didn't like waiting :)

It seems reasonable to reject this pull request -- awesome-lint does the reasonable thing already without command arguments sloshing around 2 files b/c one person is impatient.

If it's useful, I'm happy to make a separate very small pull for the --depth 1 change -- and more so if you don't need me involved for the change. Kill the other parts of this request or DIY elsewhere. Whatever's easier.

@sindresorhus
Copy link
Owner

If it's useful, I'm happy to make a separate very small pull for the --depth 1 change

👍

@WillForan WillForan mentioned this pull request Jan 2, 2024
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.

2 participants