set license headers on conf files (#227)
This commit is contained in:
parent
4a36d2600e
commit
0a8b8a572f
46 changed files with 169 additions and 54 deletions
|
|
@ -9,6 +9,7 @@ You're always welcome to submit your PR straight away and start the discussion (
|
|||
If you have questions about the contribution process or discuss specific issues, please interact with the community using the following resources.
|
||||
|
||||
- [GitHub discussions](https://github.com/apache/incubator-pekko/discussions): for questions and general discussion.
|
||||
- [Pekko user mailing list](https://lists.apache.org/list.html?user@pekko.apache.org): for Pekko usage discussions.
|
||||
- [Pekko dev mailing list](https://lists.apache.org/list.html?dev@pekko.apache.org): for Pekko development discussions.
|
||||
- [GitHub issues](https://github.com/apache/incubator-pekko/issues): for bug reports and feature requests. Please search the existing issues before creating new ones. If you are unsure whether you have found a bug, consider asking in GitHub discussions or the mailing list first.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
##################################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
###################################################
|
||||
# Pekko Actor Typed Testkit Reference Config File #
|
||||
##################################################
|
||||
###################################################
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# used by ActorTestKitSpec
|
||||
test.from-application-test = yes
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# used by ActorTestKitSpec
|
||||
test.from-application = yes
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
pekko {
|
||||
# for the org.apache.pekko.actor.ExtensionSpec
|
||||
library-extensions += "org.apache.pekko.actor.InstanceCountingExtension"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
my-app {
|
||||
my-special-mailbox {
|
||||
mailbox-type = "org.apache.pekko.dispatch.SingleConsumerOnlyUnboundedMailbox"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
pekko.actor.typed {
|
||||
|
||||
# List FQCN of `org.apache.pekko.actor.typed.ExtensionId`s which shall be loaded at actor system startup.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
####################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#####################################
|
||||
# Pekko Actor Reference Config File #
|
||||
####################################
|
||||
########################3############
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
##############################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
###############################################
|
||||
# Pekko Cluster Metrics Reference Config File #
|
||||
##############################################
|
||||
###############################################
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits in your application.conf in order to override these settings.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# //#sharding-ext-config
|
||||
# //#number-of-shards
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
###############################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
################################################
|
||||
# Pekko Cluster Sharding Reference Config File #
|
||||
###############################################
|
||||
#######################3########################
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#
|
||||
# Run a joined trace for testing adaptivity, switching between a recency-biased R3 Corda trace and
|
||||
# a frequency-biased LIRS loop trace.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#
|
||||
# Run the "database" trace (DS1) from the authors of the ARC algorithm.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#
|
||||
# Run the merged "search" trace (MergeS) from the authors of the ARC algorithm.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#
|
||||
# Run the "glimpse" trace (gli.trace) from the authors of the LIRS algorithm.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#
|
||||
# Run the "multi3" trace (multi3.trace) from the authors of the LIRS algorithm.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#
|
||||
# Run the "postgres" trace (ps.trace) from the authors of the LIRS algorithm.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#
|
||||
# Run the "w106" binary trace (w106.trace) from the authors of the LIRS2 algorithm.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
pekko.cluster.sharding {
|
||||
passivation.simulator {
|
||||
runs = []
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#
|
||||
# Run with synthetically generated access events with a looping scan through ids.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#
|
||||
# Run with synthetically generated access events with a scrambled zipfian distribution.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#
|
||||
# Run against the text of Moby Dick, for a natural zipfian-like distribution.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#
|
||||
# Run the 14-day Wikipedia trace from 2018 (wiki2018.tr) from the LRB simulator.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
############################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#############################################
|
||||
# Pekko Cluster Tools Reference Config File #
|
||||
############################################
|
||||
#############################################
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
############################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#############################################
|
||||
# Pekko Cluster Typed Reference Config File #
|
||||
############################################
|
||||
#############################################
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
######################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#######################################
|
||||
# Pekko Cluster Reference Config File #
|
||||
######################################
|
||||
#######################################
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
pekko.coordination {
|
||||
|
||||
# Defaults for any lease implementation that doesn't include these properties
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
######################################################
|
||||
# Pekko Discovery Config #
|
||||
######################################################
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
##############################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
###############################################
|
||||
# Pekko Distributed DataReference Config File #
|
||||
##############################################
|
||||
###############################################
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
pekko.loggers = ["org.apache.pekko.testkit.TestEventListener"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#############################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
##############################################
|
||||
# Pekko Remote Testing Reference Config File #
|
||||
#############################################
|
||||
##############################################
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#######################################################
|
||||
# Pekko Persistence Query Reference Configuration File #
|
||||
#######################################################
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
##################################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
###################################################
|
||||
# Pekko Persistence Testkit Reference Config File #
|
||||
##################################################
|
||||
###################################################
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
pekko.persistence.testkit {
|
||||
events {
|
||||
assert-timeout = 500ms
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
pekko.actor {
|
||||
|
||||
serialization-identifiers."org.apache.pekko.persistence.typed.serialization.ReplicatedEventSourcingSerializer" = 40
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
###########################################################
|
||||
# Pekko Persistence Extension Reference Configuration File #
|
||||
###########################################################
|
||||
|
|
|
|||
|
|
@ -37,7 +37,17 @@ trait CopyrightHeader extends AutoPlugin {
|
|||
HeaderFileType("template") -> cStyleComment)))
|
||||
}
|
||||
|
||||
override def projectSettings: Seq[Def.Setting[_]] = headerMappingSettings
|
||||
private def confHeaderMappingSettings: Seq[Def.Setting[_]] =
|
||||
Seq(Compile, Test).flatMap { config =>
|
||||
inConfig(config)(
|
||||
Seq(
|
||||
headerLicense := Some(HeaderLicense.Custom(apacheSpdxHeader)),
|
||||
headerMappings := headerMappings.value ++ Map(
|
||||
HeaderFileType.conf -> hashLineComment)))
|
||||
}
|
||||
|
||||
override def projectSettings: Seq[Def.Setting[_]] =
|
||||
Def.settings(headerMappingSettings, confHeaderMappingSettings, additional)
|
||||
|
||||
def additional: Seq[Def.Setting[_]] =
|
||||
Def.settings(Compile / compile := {
|
||||
|
|
@ -61,41 +71,58 @@ trait CopyrightHeader extends AutoPlugin {
|
|||
|This file is part of the Apache Pekko project, derived from Akka.
|
||||
|""".stripMargin
|
||||
|
||||
val apacheSpdxHeader: String = "SPDX-License-Identifier: Apache-2.0"
|
||||
|
||||
val cStyleComment = HeaderCommentStyle.cStyleBlockComment.copy(commentCreator = new CommentCreator() {
|
||||
|
||||
override def apply(text: String, existingText: Option[String]): String = {
|
||||
val formatted = existingText match {
|
||||
case Some(existedText) if isValidCopyrightAnnotated(existedText) =>
|
||||
existedText
|
||||
case Some(existedText) if isOnlyLightbendOrEpflCopyrightAnnotated(existedText) =>
|
||||
HeaderCommentStyle.cStyleBlockComment.commentCreator(text, existingText) + NewLine * 2 + existedText
|
||||
case Some(existedText) =>
|
||||
throw new IllegalStateException(s"Unable to detect copyright for header:[${existedText}]")
|
||||
case Some(currentText) if isValidCopyrightAnnotated(currentText) =>
|
||||
currentText
|
||||
case Some(currentText) if isOnlyLightbendOrEpflCopyrightAnnotated(currentText) =>
|
||||
HeaderCommentStyle.cStyleBlockComment.commentCreator(text, existingText) + NewLine * 2 + currentText
|
||||
case Some(currentText) =>
|
||||
throw new IllegalStateException(s"Unable to detect copyright for header:[${currentText}]")
|
||||
case None =>
|
||||
HeaderCommentStyle.cStyleBlockComment.commentCreator(text, existingText)
|
||||
}
|
||||
formatted.trim
|
||||
}
|
||||
|
||||
private def isApacheCopyrighted(text: String): Boolean =
|
||||
StringUtils.containsIgnoreCase(text, "licensed to the apache software foundation (asf)") ||
|
||||
StringUtils.containsIgnoreCase(text, "www.apache.org/licenses/license-2.0")
|
||||
|
||||
private def isLAMPCopyrighted(text: String): Boolean =
|
||||
StringUtils.containsIgnoreCase(text, "lamp/epfl")
|
||||
|
||||
private def isLightbendCopyrighted(text: String): Boolean =
|
||||
StringUtils.containsIgnoreCase(text, "lightbend inc.")
|
||||
|
||||
private def isValidCopyrightAnnotated(text: String): Boolean = {
|
||||
isApacheCopyrighted(text)
|
||||
}
|
||||
|
||||
private def isOnlyLightbendOrEpflCopyrightAnnotated(text: String): Boolean = {
|
||||
(isLightbendCopyrighted(text) || isLAMPCopyrighted(text)) && !isApacheCopyrighted(text)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
val hashLineComment = HeaderCommentStyle.hashLineComment.copy(commentCreator = new CommentCreator() {
|
||||
|
||||
override def apply(text: String, existingText: Option[String]): String = {
|
||||
val formatted = existingText match {
|
||||
case Some(currentText) if isApacheCopyrighted(currentText) =>
|
||||
currentText
|
||||
case Some(currentText) =>
|
||||
HeaderCommentStyle.hashLineComment.commentCreator(text, existingText) + NewLine * 2 + currentText
|
||||
case None =>
|
||||
HeaderCommentStyle.hashLineComment.commentCreator(text, existingText)
|
||||
}
|
||||
formatted.trim
|
||||
}
|
||||
})
|
||||
|
||||
private def isApacheCopyrighted(text: String): Boolean =
|
||||
StringUtils.containsIgnoreCase(text, "licensed to the apache software foundation (asf)") ||
|
||||
StringUtils.containsIgnoreCase(text, "www.apache.org/licenses/license-2.0") ||
|
||||
StringUtils.contains(text, "Apache-2.0")
|
||||
|
||||
private def isLAMPCopyrighted(text: String): Boolean =
|
||||
StringUtils.containsIgnoreCase(text, "lamp/epfl")
|
||||
|
||||
private def isLightbendCopyrighted(text: String): Boolean =
|
||||
StringUtils.containsIgnoreCase(text, "lightbend inc.")
|
||||
|
||||
private def isValidCopyrightAnnotated(text: String): Boolean = {
|
||||
isApacheCopyrighted(text)
|
||||
}
|
||||
|
||||
private def isOnlyLightbendOrEpflCopyrightAnnotated(text: String): Boolean = {
|
||||
(isLightbendCopyrighted(text) || isLAMPCopyrighted(text)) && !isApacheCopyrighted(text)
|
||||
}
|
||||
}
|
||||
|
||||
object CopyrightHeader extends CopyrightHeader
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#//#shared
|
||||
#####################################
|
||||
######################################
|
||||
# Pekko Remote Reference Config File #
|
||||
#####################################
|
||||
######################################
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
##########################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
###########################################
|
||||
# Pekko Serialization Jackson Config File #
|
||||
##########################################
|
||||
###########################################
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
pekko {
|
||||
actor {
|
||||
serialization-bindings {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
pekko.stream.testkit {
|
||||
all-stages-stopped-timeout = 5 s
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# The StreamTestDefaultMailbox verifies that stream actors are using the dispatcher defined in ActorMaterializerSettings.
|
||||
#
|
||||
# All stream tests should use the dedicated `pekko.test.stream-dispatcher` or disable this validation by defining:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
pekko {
|
||||
loggers = ["org.apache.pekko.testkit.TestEventListener"]
|
||||
actor {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#####################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
######################################
|
||||
# Pekko Stream Reference Config File #
|
||||
#####################################
|
||||
######################################
|
||||
|
||||
# eager creation of the system wide materializer
|
||||
pekko.library-extensions += "org.apache.pekko.stream.SystemMaterializer$"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
######################################
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#######################################
|
||||
# Pekko Testkit Reference Config File #
|
||||
######################################
|
||||
#######################################
|
||||
|
||||
# This is the reference config file that contains all the default settings.
|
||||
# Make your edits/overrides in your application.conf.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
pekko {
|
||||
# Configures MetricsKit
|
||||
test.metrics {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue