headhunter
headhunter copied to clipboard
Refactoring and bug fixing
Here a list of things this PR addresses:
- update and fix gem dependencies
- use
fail
instead ofraise
for asserting - use
tidy
executable in current$PATH
if available, else fallback to gem-included version - only check HTML-ish files, prevents errors for PDFs and other stuff
- split HTML and CSS into separate runners - allows disabling of one part with
HEADHUNTER_CSS=false
- use the correct url for each validation if available
Let me know which parts you like, maybe you want to cherry-pick only certain commits - which is fine with me.
Thank you, @aaronjensen! I will have to take an in-depth look at this. I'll try to do this soon.
Tell me, did you successfully use this gem? It was something like an experiment when I wrote it, and I didn't receive much feedback, so I didn't work on it anymore.
Hi @jmuheim, I wasn't able to successfully use it, no. I had more luck with this pull request by @Kriechi, but it still caused several of my tests to fail. I'm really only interested in detecting unused css rules and I couldn't get deadweight working either so I tried this.
For now I used this: https://addons.mozilla.org/en-US/firefox/addon/dust-me-selectors/
but it would be great if there were an automated tool I could add on to my tests that'd give me a more accurate picture.
Which PR by @Kriechi do you mean?
It's good to hear I'm not the only one interested in detecting unused CSS. Maybe we can give this project some new fire together?
I don't have much time at the moment, but I certainly will in a few weeks. Which project do you want to use it for? Is it public, so I could try to get it to run?
This PR. I created it a couple of months ago - so I'm not fully aware of the changes I made any more... My main point for this PR was to split HTML and CSS detection because the HTML-framework I used was spitting out a lot of errors.