Skip to content

Commit

Permalink
Remove unnecessary source-type tags in rule tests
Browse files Browse the repository at this point in the history
source-type is actually only needed if
* the language supports more than one version
* the parser behaves differently with different versions
  (this has to do with compatibility, e.g. assert/enum keywords
  in java)
* the test needs a newer version than the default version
  (e.g. to test new language features)
* the test needs an older version than the default version
  (e.g. the rule has a maximumLanguageVersion specified)
* the rule behaves differently for different versions
  (e.g. BigIntegerInstantiation)
  • Loading branch information
adangel committed May 23, 2020
1 parent 5618257 commit a3a292d
Show file tree
Hide file tree
Showing 80 changed files with 0 additions and 330 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ class MultiCatch {
}
}
]]></code>
<source-type>java 1.7</source-type>
</test-code>

<test-code>
Expand All @@ -388,7 +387,6 @@ class MultiCatch {
}
}
]]></code>
<source-type>java 1.7</source-type>
</test-code>

<test-code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ public class Foo {
}
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand All @@ -82,7 +81,6 @@ public class Foo {
private List<TestInterfaceTwo> x = new ArrayList<TestInterfaceTwo>();
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand All @@ -96,7 +94,6 @@ public class Foo {
private List<Collection> x = new ArrayList<Collection>();
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand All @@ -109,7 +106,6 @@ import foo.annotation.RetentionPolicy;
public @interface Foo {
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand All @@ -122,7 +118,6 @@ import foo.FooAnnotation2;
@FooAnnotation2
public class Foo {}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand Down Expand Up @@ -158,7 +153,6 @@ public class Foo {
}
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand All @@ -171,7 +165,6 @@ public class Foo {
}
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ public class Foo {
}
}
]]></code>
<source-type>java 1.8</source-type>
</test-code>

<test-code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ public class Foo {
}
}
]]></code>
<source-type>java 1.8</source-type>
</test-code>

<test-code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,5 @@ public class Bar extends Buz {
}
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>
</test-data>
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public class Foo {}
import static java.lang.*;
public class Foo {}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,5 @@ public class Foo {
}
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>
</test-data>
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ public class Foo {
}
}
]]></code>
<source-type>java 1.7</source-type>
</test-code>

<test-code regressionTest="false">
Expand All @@ -178,6 +177,5 @@ public class Foo {
}
}
]]></code>
<source-type>java 1.8</source-type>
</test-code>
</test-data>
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ public class Test {
private static final RemoteRepository REMOTE = new RemoteRepository<>();
}
]]></code>
<source-type>java 1.7</source-type>
</test-code>

<test-code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ public class Foo {
public <T> Bar<T> foo() { /* blah */}
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ public enum Buz {
private Buz(String s) {}
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public class Foo {
}
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public class Foo {
public <T> Bar<T> foo() { /* blah */}
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public class Bar {
}
}
]]></code>
<source-type>java 1.5</source-type>
</test-code>

<test-code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ public class FooTest {
}
}
]]></code>
<source-type>java 1.8</source-type>
</test-code>

<test-code>
Expand All @@ -160,7 +159,6 @@ public class Foo {
}
}
]]></code>
<source-type>java 1.8</source-type>
</test-code>

<test-code>
Expand All @@ -178,6 +176,5 @@ public class LocalVariableTypeInferenceTryWithResources {
}
}
]]></code>
<source-type>java 10</source-type>
</test-code>
</test-data>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ with (object) {
property = 3; // Might be on object, might be on window: who knows.
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>
</test-data>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
function foo() {
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>

<test-code>
Expand All @@ -22,7 +21,6 @@ function foo() {
return true;
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>

<test-code>
Expand All @@ -33,7 +31,6 @@ function foo() {
return;
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>

<test-code>
Expand All @@ -47,7 +44,6 @@ function foo() {
return;
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>

<test-code>
Expand All @@ -61,7 +57,6 @@ function foo() {
return;
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>

<test-code>
Expand All @@ -81,6 +76,5 @@ function foo() {
return;
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>
</test-data>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ function(arg) {
};
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>

<test-code>
Expand All @@ -36,6 +35,5 @@ function(arg) {
};
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>
</test-data>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ for (var p in obj) {
obj[p] = obj[p];
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>

<test-code>
Expand All @@ -25,7 +24,6 @@ function foo() {
}
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>

<test-code>
Expand All @@ -46,7 +44,6 @@ function foo() {
// 'p' still has value of 'clean'.
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>

<test-code>
Expand All @@ -57,7 +54,6 @@ for (p in obj) {
obj[p] = obj[p];
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>

<test-code>
Expand All @@ -70,7 +66,6 @@ function() {
}
};
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>

<test-code>
Expand All @@ -91,6 +86,5 @@ function bar() {
// 'p' is trashed and has value of 'dirty'!
}
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>
</test-data>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<code><![CDATA[
parseInt("10");
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>

<test-code>
Expand All @@ -19,6 +18,5 @@ parseInt("10");
<code><![CDATA[
parseInt("10", 16);
]]></code>
<source-type>ecmascript 3</source-type>
</test-code>
</test-data>
Loading

0 comments on commit a3a292d

Please sign in to comment.