google / addlicense

A program which ensures source code files have copyright license headers by scanning directory patterns recursively

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intermittent failure

hirak99 opened this issue · comments

On some runs, freuqnetly enough, this completely erases the existing code, and replaces it with license text.

My guess is that there's perhaps a race condition somewhere in the code.

To replicate this, the following works for me -

  1. I invoke it like below (on a repo with just about 15 files) -
find | xargs ~/go/bin/addlicense

I have about 15 files.

There's a good chance that this erases one of my files with just the license. If it didn't -

  1. Git reset to remove the lincense again -
git reset --hard

And go to step 1 until you see this happening.