Browse Source

set up an AUTHORS file to attribute copyright

Many files were missing copyright, so also add a short script to add the
missing lines with the current year, and run it.

The AUTHORS file is also self-explanatory. Contributors can add
themselves there, or we can simply update it from time to time via
git-shortlog.

Since we have two scripts now, set up a directory for them.
Daniel Martí 1 year ago
parent
commit
805c895d59

+ 2 - 1
.github/workflows/test.yml

@@ -42,10 +42,11 @@ jobs:
       run: |
         go version
         go test ./...
+
   code-checks:
     runs-on: ubuntu-latest
     steps:
     - name: Checkout code
       uses: actions/checkout@v2
     - name: Test that only LF line endings are used
-      run: bash crlf_test.sh
+      run: ./scripts/crlf-test.sh

+ 14 - 0
AUTHORS

@@ -0,0 +1,14 @@
+# This is the official list of Garble authors for copyright purposes.
+
+# Names should be added to this file as one of
+#     Organization's name
+#     Individual's name <submission email address>
+
+# Please keep the list sorted.
+
+Andrew LeFevre <jalefevre@liberty.edu>
+Daniel Martí <mvdan@mvdan.cc>
+Nicholas Jones <me@nicholasjon.es>
+Zachary Wasserman <zachwass2000@gmail.com>
+lu4p <lu4p@pm.me>
+pagran <pagran@protonmail.com>

+ 3 - 0
CONTRIBUTING.md

@@ -7,6 +7,9 @@ Thank you for your interest in contributing! Here are some ground rules:
 3. All contributions are done in PRs with at least one review and CI
 4. We use the `#obfuscation` channel over at the [Gophers Slack](https://invite.slack.golangbridge.org/) to chat
 
+When contributing for the first time, you should also add yourself to the
+[AUTHORS file](AUTHORS).
+
 ### Testing
 
 Just the usual `go test ./...`; many of the tests are in

+ 1 - 1
LICENSE

@@ -1,4 +1,4 @@
-Copyright (c) 2019, Daniel Martí. All rights reserved.
+Copyright (c) 2019, The Garble Authors.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are

+ 2 - 2
bench_test.go

@@ -1,5 +1,5 @@
-// Copyright (c) 2020, Daniel Martí <mvdan@mvdan.cc>
-// See LICENSE for licensing information
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
 
 package main
 

+ 3 - 0
import_obfuscation.go

@@ -1,3 +1,6 @@
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
+
 package main
 
 import (

+ 3 - 0
internal/asthelper/asthelper.go

@@ -1,3 +1,6 @@
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
+
 package asthelper
 
 import (

+ 3 - 0
internal/literals/literals.go

@@ -1,3 +1,6 @@
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
+
 package literals
 
 import (

+ 3 - 0
internal/literals/obfuscators.go

@@ -1,3 +1,6 @@
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
+
 package literals
 
 import (

+ 3 - 0
internal/literals/seed.go

@@ -1,3 +1,6 @@
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
+
 package literals
 
 import (

+ 3 - 0
internal/literals/shuffle.go

@@ -1,3 +1,6 @@
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
+
 package literals
 
 import (

+ 3 - 0
internal/literals/simple.go

@@ -1,3 +1,6 @@
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
+
 package literals
 
 import (

+ 3 - 0
internal/literals/split.go

@@ -1,3 +1,6 @@
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
+
 package literals
 
 import (

+ 3 - 0
internal/literals/swap.go

@@ -1,3 +1,6 @@
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
+
 package literals
 
 import (

+ 3 - 0
line_obfuscator.go

@@ -1,3 +1,6 @@
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
+
 package main
 
 import (

+ 2 - 2
main.go

@@ -1,5 +1,5 @@
-// Copyright (c) 2019, Daniel Martí <mvdan@mvdan.cc>
-// See LICENSE for licensing information
+// Copyright (c) 2019, The Garble Authors.
+// See LICENSE for licensing information.
 
 package main
 

+ 2 - 2
main_test.go

@@ -1,5 +1,5 @@
-// Copyright (c) 2019, Daniel Martí <mvdan@mvdan.cc>
-// See LICENSE for licensing information
+// Copyright (c) 2019, The Garble Authors.
+// See LICENSE for licensing information.
 
 package main
 

+ 3 - 0
runtime_api.go

@@ -1,3 +1,6 @@
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
+
 package main
 
 import (

+ 2 - 1
crlf_test.sh

@@ -1,4 +1,5 @@
 #!/bin/bash
+
 if \
 	grep \
 		--recursive \
@@ -16,4 +17,4 @@ if \
 fi
 
 echo -e "No files with CRLF endings found."
-exit 0
+exit 0

+ 11 - 0
scripts/ensure-copyrights.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+for f in $(git ls-files '*.go'); do
+	if ! grep -q Copyright $f; then
+		sed -i '1i\
+// Copyright (c) 2020, The Garble Authors.\
+// See LICENSE for licensing information.\
+
+' $f
+	fi
+done

+ 3 - 0
testdata/bench/main.go

@@ -1,3 +1,6 @@
+// Copyright (c) 2020, The Garble Authors.
+// See LICENSE for licensing information.
+
 package main
 
 import "fmt"