diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f1833fb..e4b4fdf 100644 --- a/.github/workflows/test.yml +++ b/.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 diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..3b8e0b3 --- /dev/null +++ b/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 + +# Please keep the list sorted. + +Andrew LeFevre +Daniel Martí +Nicholas Jones +Zachary Wasserman +lu4p +pagran diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 59c46b5..7c42a2f 100644 --- a/CONTRIBUTING.md +++ b/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 diff --git a/LICENSE b/LICENSE index 03e3bfc..23c28f2 100644 --- a/LICENSE +++ b/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 diff --git a/bench_test.go b/bench_test.go index 46f2303..ea22217 100644 --- a/bench_test.go +++ b/bench_test.go @@ -1,5 +1,5 @@ -// Copyright (c) 2020, Daniel Martí -// See LICENSE for licensing information +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. package main diff --git a/import_obfuscation.go b/import_obfuscation.go index c7dee9d..c839cfa 100644 --- a/import_obfuscation.go +++ b/import_obfuscation.go @@ -1,3 +1,6 @@ +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. + package main import ( diff --git a/internal/asthelper/asthelper.go b/internal/asthelper/asthelper.go index c14ecba..1b0ed6b 100644 --- a/internal/asthelper/asthelper.go +++ b/internal/asthelper/asthelper.go @@ -1,3 +1,6 @@ +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. + package asthelper import ( diff --git a/internal/literals/literals.go b/internal/literals/literals.go index 2c1d01a..4baaac9 100644 --- a/internal/literals/literals.go +++ b/internal/literals/literals.go @@ -1,3 +1,6 @@ +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. + package literals import ( diff --git a/internal/literals/obfuscators.go b/internal/literals/obfuscators.go index 7e11100..d9a7906 100644 --- a/internal/literals/obfuscators.go +++ b/internal/literals/obfuscators.go @@ -1,3 +1,6 @@ +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. + package literals import ( diff --git a/internal/literals/seed.go b/internal/literals/seed.go index 18bd2b9..04f35f9 100644 --- a/internal/literals/seed.go +++ b/internal/literals/seed.go @@ -1,3 +1,6 @@ +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. + package literals import ( diff --git a/internal/literals/shuffle.go b/internal/literals/shuffle.go index 075839b..4291bc4 100644 --- a/internal/literals/shuffle.go +++ b/internal/literals/shuffle.go @@ -1,3 +1,6 @@ +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. + package literals import ( diff --git a/internal/literals/simple.go b/internal/literals/simple.go index e7e9d88..208a3c8 100644 --- a/internal/literals/simple.go +++ b/internal/literals/simple.go @@ -1,3 +1,6 @@ +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. + package literals import ( diff --git a/internal/literals/split.go b/internal/literals/split.go index 39816b6..9947efe 100644 --- a/internal/literals/split.go +++ b/internal/literals/split.go @@ -1,3 +1,6 @@ +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. + package literals import ( diff --git a/internal/literals/swap.go b/internal/literals/swap.go index fec000e..6f8e194 100644 --- a/internal/literals/swap.go +++ b/internal/literals/swap.go @@ -1,3 +1,6 @@ +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. + package literals import ( diff --git a/line_obfuscator.go b/line_obfuscator.go index 61024bb..72ff29e 100644 --- a/line_obfuscator.go +++ b/line_obfuscator.go @@ -1,3 +1,6 @@ +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. + package main import ( diff --git a/main.go b/main.go index c34a920..1a054ee 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,5 @@ -// Copyright (c) 2019, Daniel Martí -// See LICENSE for licensing information +// Copyright (c) 2019, The Garble Authors. +// See LICENSE for licensing information. package main diff --git a/main_test.go b/main_test.go index 46bf643..ae65fd4 100644 --- a/main_test.go +++ b/main_test.go @@ -1,5 +1,5 @@ -// Copyright (c) 2019, Daniel Martí -// See LICENSE for licensing information +// Copyright (c) 2019, The Garble Authors. +// See LICENSE for licensing information. package main diff --git a/runtime_api.go b/runtime_api.go index dc27113..bf19c96 100644 --- a/runtime_api.go +++ b/runtime_api.go @@ -1,3 +1,6 @@ +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. + package main import ( diff --git a/crlf_test.sh b/scripts/crlf-test.sh old mode 100644 new mode 100755 similarity index 97% rename from crlf_test.sh rename to scripts/crlf-test.sh index 86df13b..315abf2 --- a/crlf_test.sh +++ b/scripts/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 \ No newline at end of file +exit 0 diff --git a/scripts/ensure-copyrights.sh b/scripts/ensure-copyrights.sh new file mode 100755 index 0000000..b8684c7 --- /dev/null +++ b/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 diff --git a/testdata/bench/main.go b/testdata/bench/main.go index 1653fe6..74f3d9b 100644 --- a/testdata/bench/main.go +++ b/testdata/bench/main.go @@ -1,3 +1,6 @@ +// Copyright (c) 2020, The Garble Authors. +// See LICENSE for licensing information. + package main import "fmt"