You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2022/10/27 20:11:25 UTC

[royale-compiler] branch develop updated: linter: fix FieldNameRule allowing uppercase letter after _ at start

This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git


The following commit(s) were added to refs/heads/develop by this push:
     new b7f3c3d05 linter: fix FieldNameRule allowing uppercase letter after _ at start
b7f3c3d05 is described below

commit b7f3c3d050165935128229b8b008ddb3eccb1524
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Thu Oct 27 13:11:10 2022 -0700

    linter: fix FieldNameRule allowing uppercase letter after _ at start
---
 linter/src/main/java/org/apache/royale/linter/rules/FieldNameRule.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linter/src/main/java/org/apache/royale/linter/rules/FieldNameRule.java b/linter/src/main/java/org/apache/royale/linter/rules/FieldNameRule.java
index 68c26a093..a78695650 100644
--- a/linter/src/main/java/org/apache/royale/linter/rules/FieldNameRule.java
+++ b/linter/src/main/java/org/apache/royale/linter/rules/FieldNameRule.java
@@ -41,7 +41,7 @@ import org.apache.royale.linter.problems.ILinterProblem;
  * Check that field names match a specific pattern.
  */
 public class FieldNameRule extends LinterRule {
-	public static final Pattern DEFAULT_NAME_PATTERN = Pattern.compile("^[_a-z][a-zA-Z0-9]*$");
+	public static final Pattern DEFAULT_NAME_PATTERN = Pattern.compile("^_?[a-z][a-zA-Z0-9]*$");
 
 	@Override
 	public Map<ASTNodeID, NodeVisitor> getNodeVisitors() {