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

feat: Add support for --dump-inputs #1159

Merged
merged 8 commits into from
Jul 16, 2023
Merged

feat: Add support for --dump-inputs #1159

merged 8 commits into from
Jul 16, 2023

Conversation

Techassi
Copy link
Contributor

Fixes #684

This PR adds support for the CLI flag --dump-inputs which prints out input sources without collecting and checking links.

lychee-lib/src/collector.rs Outdated Show resolved Hide resolved
Copy link
Member

@mre mre left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this! Very nice and clean implementation.
The only thing I'd add would be a unit and/or integration test, to make sure it produces the expected output. Let me know if you need some support with that, but I guess you got this.

README.md Outdated Show resolved Hide resolved
lychee-bin/src/commands/dump.rs Outdated Show resolved Hide resolved
lychee-bin/src/options.rs Outdated Show resolved Hide resolved
lychee-lib/src/types/input.rs Show resolved Hide resolved
@Techassi
Copy link
Contributor Author

Techassi commented Jul 15, 2023

I added some integration tests in ac3fa41. I think this PR is now good to go!

@Techassi Techassi requested a review from mre July 15, 2023 20:39
@mre
Copy link
Member

mre commented Jul 16, 2023

Great! I made a minor change to run the integration tests from a newly-created fixtures/dump_input subfolder. The reason being, that it's easier to keep the test fixtures isolated this way. Otherwise, we'd have to update the dump_input tests if we moved files around for other tests.

Hope that's fine. Looks good to me now. 😃

@mre mre merged commit f53619a into lycheeverse:master Jul 16, 2023
@Techassi
Copy link
Contributor Author

Techassi commented Jul 16, 2023

Yes, that's fine! Moving these test files into their folder for the obvious reasons you mentioned makes sense 😄 Thank you for merging this super quickly!

EDIT: I created an upstream PR to test if a string contains all needles. This is especially useful when checking multiple lines of output. If this gets merged, we can simplify the tests quite a lot.

@Techassi Techassi deleted the feat/dump-inputs branch July 16, 2023 16:23
@mre mre added the enhancement New feature or request label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add --dump-input flag to print all files, which would be searched for links
2 participants