On 28/01/2016, 17:08, "gem5-dev on behalf of Steve Reinhardt" <[email protected] on behalf of [email protected]> wrote:
>On Thu, Jan 28, 2016 at 1:53 AM Andreas Sandberg ><[email protected]> >wrote: > >> Hi Steve, >> >> On 26/01/2016, 22:44, "gem5-dev on behalf of Steve Reinhardt" < >> [email protected]<mailto:[email protected]> on behalf of >> [email protected]<mailto:[email protected]>> wrote: >> <snip> >> >> - There's also a bunch of code at the bottom of style.py to allow you >>to >> run it directly as a python script (and not just as a mercurial >>plug-in). >> However, as far I can tell, most if not all of that code is broken. Is >> there really a need to maintain this? I can see where it would be >>nice, so >> I'd definitely keep it if it worked, but at this point I'd rather just >> delete it than have to fix it. >> >> I would very much like to keep this functionality and possibly even >>extend >> it a bit. We are planning a switch to git internally, so this would be >> required if we are going to be able to run the style checker. >> > >Good point, though I think "fix" or even "rewrite" might be more >appropriate verbs than "extend". You¹re probably right, rewrite is probably a better description. I suspect we¹ll have to create some abstraction layer that allows us to extract diffs from both Mercurial and git if we want to keep the ability to apply the style checker to a subset of a file. However, I¹m not sure if that¹s desirable. I have had issues with the style checker (false positives and negatives) due to the partial view in the past, so it might make sense to apply it to the entire files instead of individual changes. >So if you switch to git, will you be able to install this script as a hook >as we do with mercurial? As I mentioned, the thing that prompted me to >dig >into this is the apparently increasing number of style errors that are >creeping into the committed code, and it would be good to try to close >down >the paths that allow that to happen. Yes, that should be possible. There are several hooks [1] that can be used to run scripts in different parts of the commit process. We have an internal task to port the existing Mercurial hooks to git. Unfortunately, I don¹t have a timeline yet. //Andreas [1] https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
