Skip to content

Commit

Permalink
HSEARCH-4971 Enforce copyright headers on more file types
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Mar 25, 2024
1 parent 2ecf658 commit 01d5a4f
Show file tree
Hide file tree
Showing 112 changed files with 272 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Red Hat Inc. and Hibernate Authors

# The main CI of Hibernate Search is https://ci.hibernate.org/job/hibernate-search/.
# However, Hibernate Search builds run on GitHub actions regularly
# to build on Windows
Expand Down
10 changes: 10 additions & 0 deletions build/config/src/main/resources/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
<property name="fileExtensions" value="xml"/>
</module>

<module name="Header">
<property name="headerFile" value="classpath:/org/hibernate/search/headers/properties.header"/>
<property name="fileExtensions" value="properties"/>
</module>

<module name="Header">
<property name="headerFile" value="classpath:/org/hibernate/search/headers/adoc.header"/>
<property name="fileExtensions" value="adoc,asciidoc"/>
</module>

<module name="TreeWalker">

<module name="SuppressionCommentFilter" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Red Hat Inc. and Hibernate Authors
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright Red Hat Inc. and Hibernate Authors
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[configuration-properties-aggregated]]
== List of all available configuration properties

Expand Down
2 changes: 2 additions & 0 deletions documentation/src/main/asciidoc/internals/index.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
= Internals of Hibernate Search
:doctype: book
:revdate: {docdate}
Expand Down
2 changes: 2 additions & 0 deletions documentation/src/main/asciidoc/migration/index.adoc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
= Hibernate Search {hibernateSearchVersion}: Migration Guide from {hibernateSearchPreviousStableVersionShort}
:doctype: book
:revdate: {docdate}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[NOTE]
====
Coordination is a complex topic,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[IMPORTANT]
====
There are a few constraints to keep in mind when annotating a custom projection type:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[TIP]
====
Custom, non-record classes can also be annotated with `@ProjectionConstructor`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[WARNING]
====
Features detailed in this section are _deprecated_: they should be avoided in favor of non-deprecated alternatives.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[WARNING]
====
This feature requires to directly manipulate JSON in application code.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[WARNING]
====
Direct changes to the HTTP request may conflict with Hibernate Search features
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[WARNING]
====
Regardless of the API used, explanations are rather costly performance-wise:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[IMPORTANT]
====
In order to use aggregations based on the value of a given field,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[IMPORTANT]
====
In order to use projections based on the value of a given field,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[IMPORTANT]
====
In order to use sorts based on the value of a given field,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[WARNING]
====
Features detailed below are _incubating_: they are still under active development.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[WARNING]
====
This feature implies that application code rely on Lucene APIs directly.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[NOTE]
====
This feature is only available with the <<mapper-orm,Hibernate ORM integration>>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[WARNING]
====
`@SearchEntity` and its corresponding programmatic mapping `.searchEntity()`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[NOTE]
====
For a preliminary introduction to sharding,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[WARNING]
====
Features detailed in this section rely on at least one _SPI_ (Service Provider Interface):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[NOTE]
====
Timeouts are handled on a best-effort basis.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[NOTE]
====
For a preliminary introduction to writing to and reading from indexes in Hibernate Search,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
:doctype: book
:revdate: {docdate}
:sectanchors:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
:reference-documentation-location: ../../reference/index.adoc

:doctype: book
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
:reference-documentation-location: ../../reference/index.adoc

:doctype: book
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[architecture]]
= [[search-architecture]] Architecture

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[backend-elasticsearch]]
= [[elasticsearch-integration]] Elasticsearch backend

Expand Down Expand Up @@ -428,7 +430,7 @@ include::{sourcedir}/org/hibernate/search/documentation/backend/elasticsearch/cl
====
[source, XML, indent=0, subs="+callouts"]
----
include::{resourcesdir}/configuration/http-client-configurer.properties[]
include::{resourcesdir}/configuration/http-client-configurer.properties[tags=include]
----
<1> Specify the HTTP client configurer.
====
Expand Down Expand Up @@ -1183,7 +1185,7 @@ must be defined separately and assigned a name.
[source, XML, indent=0, subs="+callouts"]
----
include::{resourcesdir}/analysis/elasticsearch-simple.properties[]
include::{resourcesdir}/analysis/elasticsearch-simple.properties[tags=include]
----
<1> Assign the configurer to the backend using a Hibernate Search configuration property.
====
Expand Down Expand Up @@ -1232,7 +1234,7 @@ but hardcoding `"default"` would work just as well.
[source, XML, indent=0, subs="+callouts"]
----
include::{resourcesdir}/analysis/elasticsearch-default-override.properties[]
include::{resourcesdir}/analysis/elasticsearch-default-override.properties[tags=include]
----
<1> Assign the configurer to the backend using a Hibernate Search configuration property.
====
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[backend-lucene]]
= [[search-lucene-native]] Lucene backend

Expand Down Expand Up @@ -660,7 +662,7 @@ include::{sourcedir}/org/hibernate/search/documentation/analysis/MyLuceneAnalysi
[source, XML, indent=0, subs="+callouts"]
----
include::{resourcesdir}/analysis/lucene-simple.properties[]
include::{resourcesdir}/analysis/lucene-simple.properties[tags=include]
----
<1> Assign the configurer to the backend using a Hibernate Search configuration property.
====
Expand Down Expand Up @@ -742,7 +744,7 @@ but hardcoding `"default"` would work just as well.
[source, XML, indent=0, subs="+callouts"]
----
include::{resourcesdir}/analysis/lucene-default-override.properties[]
include::{resourcesdir}/analysis/lucene-default-override.properties[tags=include]
----
<1> Assign the configurer to the backend using a Hibernate Search configuration property.
====
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding-basics]]
= [[mapper-orm-bridge-basics]] [[section-custom-bridges]] Basics

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding-bridge-resolver]]
= [[mapper-orm-bridge-resolver]] [[_bridgeprovider_associate_a_bridge_to_a_given_return_type]] Assigning default bridges with the bridge resolver

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding-bridgedelement-dependencies]]
= [[mapper-orm-bridge-bridgedelement-dependencies]] Declaring dependencies to bridged elements

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding-identifierbridge]]
= [[mapper-orm-bridge-identifierbridge]] Identifier bridge

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding-index-field-dsl]]
= [[mapper-orm-bridge-index-field-dsl]] Declaring and writing to index fields

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding-index-field-type-dsl]]
= [[mapper-orm-bridge-index-field-type-dsl]] Defining index field types

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding-named-predicate]]
= [[mapper-orm-bridge-named-predicate]] Defining named predicates

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding-projection]]
= Projection binder

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding-propertybridge]]
= [[mapper-orm-bridge-propertybridge]] [[section-field-bridge]] Property bridge

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding-routingbridge]]
= [[mapper-orm-bridge-routingbridge]] [[mapper-orm-bridge-routingkeybridge]] Routing bridge

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding-typebridge]]
= [[mapper-orm-bridge-typebridge]] [[_classbridge]] Type bridge

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding-valuebridge]]
= [[mapper-orm-bridge-valuebridge]] [[_stringbridge]] Value bridge

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[binding]]
= [[mapper-orm-bridge]] [[search-mapping-bridge]] Binding and bridges

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[compatibility]]
= [[getting-started-compatibility]] Compatibility

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[concepts]]
= [[_concepts]] Concepts

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[appendix]
[[configuration-properties-aggregated]]
= List of all available configuration properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[configuration]]
= [[search-configuration]] Configuration

Expand Down Expand Up @@ -432,7 +434,7 @@ the context also lists references to entities that could not be indexed correctl
[source, XML, indent=0, subs="+callouts"]
----
include::{resourcesdir}/reporting/failurehandler.properties[]
include::{resourcesdir}/reporting/failurehandler.properties[tags=include]
----
Assign the background failure handler using a Hibernate Search configuration property.
====
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[coordination]]
= Coordination

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[credits]]
= Credits

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[entrypoints]]
= Main API Entry Points

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[explicit-backend-index-operations]]
= Explicit backend/index operations
:leveloffset: +1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[explicit-backend-index-operations-analysis-run-analysis]]
= Applying configured analyzers/normalizers to a string

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[explicit-backend-index-operations-elasticsearch]]
= Elasticsearch-specific explicit backend/index operations

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[explicit-backend-index-operations-lucene]]
= Lucene-specific explicit backend/index operations

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Red Hat Inc. and Hibernate Authors
[[further-reading]]
= [[_further_reading]] Further reading

Expand Down

0 comments on commit 01d5a4f

Please sign in to comment.