<div dir="ltr"><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div>How does a commit-hook align with other discussions about enforcing code
 style? [Which I haven't followed closely, hence me asking!]"<br></div></blockquote>I don't follow this list, so I'm afraid I can't answer that.<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Biggest downside of a hook would seem that it's a requirement that's effectively hidden until one actually goes to commit.</blockquote><div>It also means sheriffs will have a new duty (making sure the hook works, cancel checkin if the requirements aren't met, ...). It should be the reviewer's job to point out what's wrong and how to fix it.<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Seems like this would be something better to live as a mach command or 
script in the tree, until there are better ways to expose it as part of 
code review.<br></blockquote></div><div><img class="" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif">Yes,
 an automated script makes sense here. In fact, the tool Patrick pointed
 out has a command line utility behind it : <a href="https://github.com/svg/svgo">https://github.com/svg/svgo</a><br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">(Yes, reviewers would need to remember to ask that the tool
 be run, but given the low impact of forgetting it doesn't seem like a 
big deal.)<br></blockquote><div>Someone could also run the script periodically for all files, so we can make sure all SVG files are clean.<br><br></div><div>Tim <br></div> <br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 31, 2015 at 11:54 PM, Justin Dolske <span dir="ltr"><<a href="mailto:dolske@mozilla.com" target="_blank">dolske@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>How does a commit-hook align with other discussions about enforcing code style? [Which I haven't followed closely, hence me asking!]<br><br></div>Biggest downside of a hook would seem that it's a requirement that's effectively hidden until one actually goes to commit. Seems like this would be something better to live as a mach command or script in the tree, until there are better ways to expose it as part of code review. (Yes, reviewers would need to remember to ask that the tool be run, but given the low impact of forgetting it doesn't seem like a big deal.)<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Justin<br></font></span></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Aug 28, 2015 at 12:22 PM, Tim Nguyen <span dir="ltr"><<a href="mailto:ntim.bugs@gmail.com" target="_blank">ntim.bugs@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div>Hello Firefox Devs,<br></div>I have written an MDN doc [0] about cleaning up SVGs based on an older Etherpad [1]. I'm seeking feedback for this doc, so please tell me if there's something I should add/change/remove. <br><br></div>Also, Gijs suggested a commit hook, I haven't wrote one yet, but I've started a script [2], so once it's done, it should be easy to write a commit hook from there. If anyone could help me finish this script and set up the hook, it would be awesome too.<br><br></div>Thanks,<br></div>Tim Nguyen :ntim<br><div><div><div><div><br>[0] : <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/SVG_Guidelines" target="_blank">https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/SVG_Guidelines</a><br>[1] : <a href="https://etherpad.mozilla.org/svg-guidelines" target="_blank">https://etherpad.mozilla.org/svg-guidelines</a><br>[2] : <a href="https://gist.github.com/nt1m/21217e3e2ea5b0c0586b" target="_blank">https://gist.github.com/nt1m/21217e3e2ea5b0c0586b</a><br></div></div></div></div></div>
<br></div></div><span class="">_______________________________________________<br>
firefox-dev mailing list<br>
<a href="mailto:firefox-dev@mozilla.org" target="_blank">firefox-dev@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/firefox-dev" rel="noreferrer" target="_blank">https://mail.mozilla.org/listinfo/firefox-dev</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div>