Marcin Drobik

software journeyman notes

Code Review with Nocco

I used following bash command to generate report for code review of JavaScript and C# files:

git status --porcelain -uno | egrep ".*?\.((cs)|(js))$" | sed s/^...// | xargs nocco -p=///!
  • git status --porcelain -uno displays changed tracked files.
  • egrep ".*?\.((cs)|(js))$" filters the git status so only .cs and .js files are shown.
  • sed s/^...// removes 3 first characters (they show the status of the file), leaving only the filename.
  • xargs nocco -p=///! lunches my fork of nocco tool passing the filename as parameter. The tool will generate report by looking for lines with //! string.

comments powered by Disqus