Conversation
| cache = true | ||
|
|
||
| # TODO | ||
| # Error: invalid type: string "2d", expected struct Duration for key `max_cache_age` |
There was a problem hiding this comment.
Ouch. Yeah that's something we should fix. I think max_cache_age should be Into<Duration> instead of Duration. And maybe we need an impl From<String> for Duration to handle that case or usehuman_time. I can look into this, but for now it's fine to keep it in there.
| headers = [] | ||
|
|
||
| # TODO # Remap URI matching pattern to different URI | ||
| remap = [ "https://example.com http://example.invalid" ] |
There was a problem hiding this comment.
I think we can support a nicer syntax for remapping similar to #547 (comment):
[[remap]]
pattern = "^../../issues"
replacement = "https://github.com/usnistgov/OSCAL/issues"
[[remap]]
pattern = "https://example.com"
replacement = "https://example.net"Let's tackle that once this PR got merged.
There was a problem hiding this comment.
I like the example! :-p
I did try this re the linked CI/CD work I did on the repo (where #547 (comment) came from) and still had some issues. Will follow up later and try to work through understanding how to do the first example with the current syntax, or even the proposed syntax, in a follow-up issue.
Sorry for the delay.
|
|
||
| # TODO | ||
| # Error: invalid type: unit variant, expected newtype variant for key `base` | ||
| # base = "https://example.com" |
There was a problem hiding this comment.
Heh, don't know what's going on but it has something to do with the variants here:
lychee/lychee-lib/src/types/base.rs
Lines 12 to 17 in c4e004b
There is a
TryFrom<&str>, which I though would take care of it, but that's incorrect.We can also tackle that later.
|
Thanks for the draft. Added a few comments. 👍 |
|
Added a smoketest which tests all config options (except I'm not sure if we should keep all options in the example config enabled. The idea is that users would jump in and enable whatever they need at that moment and leave the rest to default. It's fine for now but we might change it in the future. |
|
Nicely done. Thanks for your contribution @vpereira01. 🌟 |
Fixes #630
Easy test
./lychee -c lychee.example.toml -- README.md