Skip to content

Commit

Permalink
Adds generated LICENSE headers, enables license enforcement.
Browse files Browse the repository at this point in the history
This attempts to fix #112.

This change attempts to fix up some licensing and copyright
inconsistencies in RE2J. Copyright messages have been amended to specify
"The Go Authors". The BSD-style Go license has been added to the headers
of all Java, Perl and XML source files.

This change utilizes the License Gradle
Plugin in order to
ensure that all source files (java, xml and perl) have an appropriate
LICENSE header.

License violations can be fixed automatically by running
./gradle licenseFormat. A message to this effect is displayed if any
license violations are detected.
  • Loading branch information
sjamesr committed Jul 9, 2020
1 parent 5e462a4 commit cd60131
Show file tree
Hide file tree
Showing 53 changed files with 314 additions and 119 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// Copyright 2019 Google Inc. All Rights Reserved.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j.benchmark;

import org.openjdk.jmh.annotations.Benchmark;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// Copyright 2019 Google Inc. All Rights Reserved.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j.benchmark;

import org.openjdk.jmh.annotations.Benchmark;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// Copyright 2019 Google Inc. All Rights Reserved.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j.benchmark;

import org.openjdk.jmh.annotations.Benchmark;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// Copyright 2019 Google Inc. All Rights Reserved.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j.benchmark;

import org.openjdk.jmh.annotations.Benchmark;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// Copyright 2019 Google Inc. All Rights Reserved.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j.benchmark;

public enum Implementations {
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ allprojects {
header rootProject.file('LICENSE.header')
ext.year = Calendar.getInstance().get(Calendar.YEAR)
strictCheck true
ignoreFailures true

mapping {
// Without this, the plugin adds javadoc-style comments to the top
Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/CharClass.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Original Go source here:
// http://code.google.com/p/go/source/browse/src/pkg/regexp/syntax/parse.go

Expand Down
6 changes: 6 additions & 0 deletions java/com/google/re2j/CharGroup.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// GENERATED BY make_perl_groups.pl; DO NOT EDIT.
// make_perl_groups.pl >perl_groups.go

Expand Down
6 changes: 6 additions & 0 deletions java/com/google/re2j/Characters.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j;

/** Wraps Character methods to be overridden for GWT. */
Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/Compiler.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Original Go source here:
// http://code.google.com/p/go/source/browse/src/pkg/regexp/syntax/compile.go

Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/Inst.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Original Go source here:
// http://code.google.com/p/go/source/browse/src/pkg/regexp/syntax/prog.go

Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/Machine.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Original Go source here:
// http://code.google.com/p/go/source/browse/src/pkg/regexp/exec.go

Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/MachineInput.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Original Go source here:
// http://code.google.com/p/go/source/browse/src/pkg/regexp/regexp.go

Expand Down
8 changes: 6 additions & 2 deletions java/com/google/re2j/Matcher.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// Copyright 2010 Google Inc. All Rights Reserved.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j;

import java.util.Map;
Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/Parser.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Original Go source here:
// http://code.google.com/p/go/source/browse/src/pkg/regexp/syntax/parse.go

Expand Down
8 changes: 6 additions & 2 deletions java/com/google/re2j/Pattern.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// Copyright 2010 Google Inc. All Rights Reserved.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j;

import java.io.Serializable;
Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/PatternSyntaxException.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j;

/**
Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/Prog.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Original Go source here:
// http://code.google.com/p/go/source/browse/src/pkg/regexp/syntax/prog.go

Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/RE2.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Original Go source here:
// http://code.google.com/p/go/source/browse/src/pkg/regexp/regexp.go

Expand Down
8 changes: 8 additions & 0 deletions java/com/google/re2j/RE2J.gwt.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<!--
Copyright (c) 2020 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<module rename-to="re2j">
<inherits name="com.google.gwt.user.User" />
<source path=""/>
Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/Regexp.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Original Go source here:
// http://code.google.com/p/go/source/browse/src/pkg/regexp/syntax/regexp.go

Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/Simplify.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Original Go source here:
// http://code.google.com/p/go/source/browse/src/pkg/regexp/syntax/simplify.go

Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/Unicode.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Many of these were derived from the corresponding Go functions in
// http://code.google.com/p/go/source/browse/src/pkg/unicode/letter.go

Expand Down
6 changes: 6 additions & 0 deletions java/com/google/re2j/UnicodeTables.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Generated at 2020-06-09T16:20:06.352Z by Java 1.8.0_181 using Unicode version 6.0.0.0.
// Do not change this file, your edits will be lost. Instead change UnicodeTablesGenerator.java.
package com.google.re2j;
Expand Down
10 changes: 6 additions & 4 deletions java/com/google/re2j/Utils.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j;

/**
Expand Down
5 changes: 4 additions & 1 deletion java/com/google/re2j/make_perl_groups.pl
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/usr/bin/perl
# Copyright 2008 The Go Authors. All rights reserved.
#
# Copyright (c) 2020 The Go Authors. All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
#

# Modified version of make_perl_groups.pl from RE2/Go:
# code.google.com/p/go/source/browse/src/pkg/regexp/syntax/make_perl_groups.pl
Expand Down
6 changes: 6 additions & 0 deletions java/com/google/re2j/super/com/google/re2j/Characters.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j;

/** GWT supersource for {@link Character#toLowerCase}. */
Expand Down
8 changes: 6 additions & 2 deletions javatests/com/google/re2j/ApiTestUtils.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// Copyright 2012 Google Inc. All Rights Reserved.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j;

import com.google.common.truth.Truth;
Expand Down
11 changes: 6 additions & 5 deletions javatests/com/google/re2j/CharClassTest.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright 2011 Google Inc. All Rights Reserved.
//
// Partly plundered from third_party/re2/testing/charclass_test.cc,
// updated to account for proper Unicode case folding.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
package com.google.re2j;

import static com.google.re2j.Utils.stringToRunes;
Expand Down
10 changes: 6 additions & 4 deletions javatests/com/google/re2j/ExecTest.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Original Go source here:
// http://code.google.com/p/go/source/browse/src/pkg/regexp/syntax/exec_test.go

Expand Down
10 changes: 6 additions & 4 deletions javatests/com/google/re2j/FindTest.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
* Copyright (c) 2020 The Go Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
// Original Go source here:
// http://code.google.com/p/go/source/browse/src/pkg/regexp/find_test.go
//
Expand Down
Loading

0 comments on commit cd60131

Please sign in to comment.