becheran / mlc

Check for broken links in markup files
MIT License
129 stars 17 forks source link

Support reading ` .gitignore` if present to ignore paths #77

Closed nuke-web3 closed 2 months ago

nuke-web3 commented 1 year ago

Is your feature request related to a problem? Please describe.

I don't want to duplicate the paths listed in .gitignore in mlc config. I would like the option (on by default) to use .gitignore as a baseline, and then respect ignoring any additional paths defined in the config.

Describe the solution you'd like

Ideally detecting this present in the pwd and/or target path to do check on and using it automatically would be great. Alternative patters:

Describe alternatives you've considered

Duplication of the ignore settings in this and other tools :upside_down_face:

becheran commented 1 year ago

Good idea. It would require to add and support the full gitignore syntax in mlc which is currently not the case.

nuke-web3 commented 11 months ago

Looks like almost a drop in replacement for https://docs.rs/walkdir/latest/walkdir/ could be https://docs.rs/ignore/latest/ignore/ :thinking: might need some more CLI and config tweaks to select specifics about ignoring things. I suspect almost all users would want to default to ignoring .gitignore and .ignore files.

Actually the latter is just a superset of the former :stuck_out_tongue_closed_eyes: https://github.com/BurntSushi/ripgrep/blob/master/crates/ignore/Cargo.toml#L30

becheran commented 2 months ago

Added optinal .gitignore with: #94