A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/pull/3302 below:

[test] Improve xml test schema · Issue #3302 · pmd/pmd · GitHub

Is your feature request related to a problem? Please describe.
Currently there's a few things that are not so great with the test schema

  1. the only way to ignore a test is to set the attribute regressionTest to false, which is... weird
  2. there's no way to execute a single test ("focus" a test). Some IDEs may provide this facility (eclipse), but some don't (intellij), and having an ide-independent way to do this would be nice
  3. the attribute reinitializeRule of test-code is useless. I can't see a reason not to reinitialize the rule.
  4. we could remove the pattern from the source-type element, as we do the validation at runtime anyway. This means we wouldn't have to update the schema when we add/remove languages, which makes pmd easier to extend
  5. validation of consistency between expected-problems, expected-messages and expected-linenumbers is buggy. Sometimes it throws a validation error, sometimes it's silent. For instance
         <expected-problems>0</expected-problems>
         <expected-messages>
             <message>1</message>
         </expected-messages>

throws a validation error, but the following doesn't

      <expected-problems>1</expected-problems>
      <expected-linenumbers>1,2,3</expected-linenumbers>
      <expected-messages>
          <message>1</message>
      </expected-messages>

Describe the solution you'd like Update the schema and its parser to support focus and disabled attributes, deprecate useless things

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Some other things that we should keep in mind and fix later:

  1. the <rule-property> element has ad-hoc syntax, instead of just reusing the syntax for <property> that's from the ruleset schema. This will be awkward when the XSD for rulesets is updated ( [core] Implementation plan for property framework changes #1432)
  2. the useAuxClasspath attribute doesn't look useful. Related to [java] Improve rule tests with auxclasspath #2649

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4