Conversation
This allows to only run HTML or CSS stuff only
lib/headhunter/html_validator.rb
Outdated
There was a problem hiding this comment.
Line is too long. [88/80]
There was a problem hiding this comment.
%x-literals should be delimited by ( and )
Do not use %x unless the command string contains backquotes.
There was a problem hiding this comment.
I think I used backticks for executing system commands. What's better?
There was a problem hiding this comment.
Actually you used Open3.popen3 - but I couldn't find a specific reason - so I changed it to use standard ruby invocation.
|
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... |
Here a list of things this PR addresses:
failinstead ofraisefor assertingtidyexecutable in current$PATHif available, else fallback to gem-included versionHEADHUNTER_CSS=falseLet me know which parts you like, maybe you want to cherry-pick only certain commits - which is fine with me.