kwin commented on code in PR #216: URL: https://github.com/apache/maven-enforcer/pull/216#discussion_r1059778363
########## maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/internal/EnforcerRuleManager.java: ########## @@ -93,6 +112,16 @@ public List<EnforcerRuleDesc> createRules(PlexusConfiguration rules) throws Enfo private EnforcerRuleDesc createRuleDesc(String name, String implementation) throws EnforcerRuleManagerException { + // component name should always start at lowercase character + String ruleName = Character.toLowerCase(name.charAt(0)) + name.substring(1); + + try { + return new EnforcerRuleDesc(ruleName, plexusContainer.lookup(EnforcerRuleBase.class, ruleName)); Review Comment: What is the default scope of Sisu components? How does it work, if the same rule is being used more than once with different parameters in parallel? Shouldn't rules having the singleton scope lead to a warn at least to prevent race conditions with multi-threading? What about allowing to reuse rule objects but always pass the current parametrisation as argument to the execute method? ########## maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/internal/AbstarctEnforcerLogger.java: ########## @@ -0,0 +1,88 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.maven.plugins.enforcer.internal; + +import java.util.Objects; +import java.util.function.Supplier; + +import org.apache.maven.enforcer.rule.api.EnforcerLogger; +import org.apache.maven.plugin.logging.Log; + +/** + * Base EnforcerLogger implementation + * + * @author Slawomir Jaranowski + * @since 3.2.0 + */ +public abstract class AbstarctEnforcerLogger implements EnforcerLogger { Review Comment: ```suggestion public abstract class AbstractEnforcerLogger implements EnforcerLogger { ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org