headhunter icon indicating copy to clipboard operation
headhunter copied to clipboard

Refactoring and bug fixing

Open Kriechi opened this issue 10 years ago • 4 comments

Here a list of things this PR addresses:

  • update and fix gem dependencies
  • use fail instead of raise 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.

Kriechi avatar Jul 21 '14 11:07 Kriechi

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.

jmuheim avatar Oct 20 '14 09:10 jmuheim

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.

aaronjensen avatar Oct 20 '14 14:10 aaronjensen

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?

jmuheim avatar Oct 20 '14 18:10 jmuheim

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.

Kriechi avatar Oct 20 '14 18:10 Kriechi