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

commit e89ab9890fa372ffd2357acf38d9a23792105a33
Author: Josh Tynjala <joshtynj...@apache.org>
AuthorDate: Mon Sep 26 15:29:55 2022 -0700

    linter: skip-local-config-file
---
 .../org/apache/royale/linter/config/Configuration.java   | 16 ++++++++++++++++
 .../org/apache/royale/linter/config/Configurator.java    |  5 +++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git 
a/linter/src/main/java/org/apache/royale/linter/config/Configuration.java 
b/linter/src/main/java/org/apache/royale/linter/config/Configuration.java
index fb458605e..12903c4d3 100644
--- a/linter/src/main/java/org/apache/royale/linter/config/Configuration.java
+++ b/linter/src/main/java/org/apache/royale/linter/config/Configuration.java
@@ -199,6 +199,22 @@ public class Configuration {
         this.files.addAll(args);
     }
 
+    //
+    // 'skip-local-config-file' option
+    //
+
+    private boolean skipLocalConfigFile = false;
+
+    public boolean getSkipLocalConfigFile() {
+        return skipLocalConfigFile;
+    }
+
+    @Config
+    @Mapping("skip-local-config-file")
+    public void setSkipLocalConfigFile(ConfigurationValue cv, boolean b) {
+        this.skipLocalConfigFile = b;
+    }
+
     //
     // 'recommended' option
     //
diff --git 
a/linter/src/main/java/org/apache/royale/linter/config/Configurator.java 
b/linter/src/main/java/org/apache/royale/linter/config/Configurator.java
index 8ea3049e0..7a48189a2 100644
--- a/linter/src/main/java/org/apache/royale/linter/config/Configurator.java
+++ b/linter/src/main/java/org/apache/royale/linter/config/Configurator.java
@@ -358,8 +358,9 @@ public class Configurator implements Cloneable
             // Load configurations from files.
             if (!loadConfig())
                 success = false;
-            
-            if (!loadLocalConfig())
+
+            String skipLocal = 
cfgbuf.peekSimpleConfigurationVar("skip-local-config-file");
+            if (!"true".equals(skipLocal) && !loadLocalConfig())
                 success = false;
             
             // The command line needs to take precedence over all defaults and 
config files.

Reply via email to