test_class.declarator: denyEtc = new Rule(RuleType.DENY, Pattern.compile("/etc(/.*)?"))
test_class.modifier: private static final
test_class.original_string: private static final Rule denyEtc = new Rule(RuleType.DENY, Pattern.compile("/etc(/.*)?"));
test_class.type: Rule
test_class.var_name: denyEtc
test_class.file: core/src/test/java/net/adamcin/oakpal/core/checks/PathsTest.java
test_class.identifier: PathsTest
test_class.superclass: extends ProgressCheckTestBase
test_case.body: @Test
      public void testCustomSeverity() throws Exception {
          TestUtil.testBlock(() -> {
              ProgressCheck check = new Paths().newInstance(key("severity", "SEVERE").key("rules", arr(denyEtc)).get());
              CheckReport report = scanWithCheck(check, "test-package-with-etc.zip");
              logViolations("level_set:no_unsafe", report);
              Assert.assertEquals("violations", 6, report.getViolations().size());
              assertTrue("all violations are SEVERE", report.getViolations().stream()
                      .allMatch(viol -> viol.getSeverity().equals(Severity.SEVERE)));
          });
      }
test_case.class_method_signature: PathsTest.testCustomSeverity()
test_case.full_signature: @Test public void testCustomSeverity()
test_case.identifier: testCustomSeverity
test_case.invocations: testBlock newInstance get key key arr scanWithCheck logViolations assertEquals size getViolations assertTrue allMatch stream getViolations equals getSeverity
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCustomSeverity()
focal_class.declarator: KEYS = new JsonKeys() {
          @Override
          public String rules() {
              return "rules";
          }
  
          @Override
          public String denyAllDeletes() {
              return "denyAllDeletes";
          }
  
          @Override
          public String severity() {
              return "severity";
          }
      }
focal_class.modifier: private static final
focal_class.original_string: private static final JsonKeys KEYS = new JsonKeys() {
          @Override
          public String rules() {
              return "rules";
          }
  
          @Override
          public String denyAllDeletes() {
              return "denyAllDeletes";
          }
  
          @Override
          public String severity() {
              return "severity";
          }
      };
focal_class.type: JsonKeys
focal_class.var_name: KEYS
focal_class.declarator: CONFIG_RULES = keys().rules()
focal_class.modifier: @Deprecated
      public static final
focal_class.original_string: @Deprecated
      public static final String CONFIG_RULES = keys().rules();
focal_class.type: String
focal_class.var_name: CONFIG_RULES
focal_class.declarator: CONFIG_DENY_ALL_DELETES = keys().denyAllDeletes()
focal_class.modifier: @Deprecated
      public static final
focal_class.original_string: @Deprecated
      public static final String CONFIG_DENY_ALL_DELETES = keys().denyAllDeletes();
focal_class.type: String
focal_class.var_name: CONFIG_DENY_ALL_DELETES
focal_class.declarator: CONFIG_SEVERITY = keys().severity()
focal_class.modifier: @Deprecated
      public static final
focal_class.original_string: @Deprecated
      public static final String CONFIG_SEVERITY = keys().severity();
focal_class.type: String
focal_class.var_name: CONFIG_SEVERITY
focal_class.declarator: DEFAULT_SEVERITY = Severity.MAJOR
focal_class.modifier: public static final
focal_class.original_string: public static final Severity DEFAULT_SEVERITY = Severity.MAJOR;
focal_class.type: Severity
focal_class.var_name: DEFAULT_SEVERITY
focal_class.file: core/src/main/java/net/adamcin/oakpal/core/checks/Paths.java
focal_class.identifier: Paths
focal_class.interfaces: implements ProgressCheckFactory
focal_class.class_method_signature: Paths.keys()
focal_class.full_signature: @NotNull public static JsonKeys keys()
focal_class.identifier: keys
focal_class.modifiers: @NotNull public static
focal_class.parameters: ()
focal_class.return: JsonKeys
focal_class.signature: JsonKeys keys()
focal_class.class_method_signature: Paths.newInstance(final JsonObject config)
focal_class.full_signature: @Override public ProgressCheck newInstance(final JsonObject config)
focal_class.identifier: newInstance
focal_class.modifiers: @Override public
focal_class.parameters: (final JsonObject config)
focal_class.return: ProgressCheck
focal_class.signature: ProgressCheck newInstance(final JsonObject config)
focal_method.body: @Override
      public ProgressCheck newInstance(final JsonObject config) {
          List<Rule> rules = Rules.fromJsonArray(arrayOrEmpty(config, keys().rules()));
  
          final boolean denyAllDeletes = hasNonNull(config, keys().denyAllDeletes())
                  && config.getBoolean(keys().denyAllDeletes());
  
          final Severity severity = Severity.valueOf(
                  config.getString(keys().severity(), DEFAULT_SEVERITY.name()).toUpperCase());
  
          return new Check(rules, denyAllDeletes, severity);
      }
focal_method.class_method_signature: Paths.newInstance(final JsonObject config)
focal_method.full_signature: @Override public ProgressCheck newInstance(final JsonObject config)
focal_method.identifier: newInstance
focal_method.invocations: fromJsonArray arrayOrEmpty rules keys hasNonNull denyAllDeletes keys getBoolean denyAllDeletes keys valueOf toUpperCase getString severity keys name
focal_method.modifiers: @Override public
focal_method.parameters: (final JsonObject config)
focal_method.return: ProgressCheck
focal_method.signature: ProgressCheck newInstance(final JsonObject config)