0

I am trying to create an utility that will get automated code review for code on github using stylecop rules. Right now the stylecop SDK works only with the entire file - so to make review for the commit I need to download the file and run stylecop all over it. And for every (even minor) commits - I need to do the same.

So I am just wondering if there is a way to make stylecop work with the diff for current commit ? That will allow me to ensure I am reviewing only changes of the current commit and current author.

chaZm
  • 404
  • 1
  • 3
  • 11
  • 1
    I don't think it would be possible for StyleCop to analyze code given only a diff. The context is simply too small. You'll probably want to analyze the whole file, but then discard messages concerning code not touched by the diff. – Michael Wild Feb 21 '13 at 13:59
  • Probably you are right. I was just hoping there is a way I am missing. I am afraid that discarding old messages could be a pain here – chaZm Feb 22 '13 at 10:11
  • I really don't know StyleCop, but maybe you can tell it to restrict its criticism to certain line ranges. – Michael Wild Feb 22 '13 at 10:17
  • Stylecop analysys is based on static settings file. Not sure if it is possible to change that config for every commit. Thanks for the help anyway – chaZm Feb 22 '13 at 10:24

0 Answers0