Skip to content

Commit 5e78d18

Browse files
thomas-serre-sonarsourcesonartech
authored andcommitted
SONARPY-3572 Move TypeMatcher to public api package (#707)
GitOrigin-RevId: 5de3c71706914af2e8f2e6eae9b54ec78fbeb523
1 parent 9f1d9ca commit 5e78d18

File tree

20 files changed

+33
-33
lines changed

20 files changed

+33
-33
lines changed

python-checks/src/main/java/org/sonar/python/checks/ArgumentNumberCheck.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import org.sonar.plugins.python.api.types.v2.FunctionType;
3535
import org.sonar.plugins.python.api.types.v2.ObjectType;
3636
import org.sonar.plugins.python.api.types.v2.ParameterV2;
37-
import org.sonar.python.api.types.v2.matchers.TypeMatchers;
37+
import org.sonar.plugins.python.api.types.v2.matchers.TypeMatchers;
3838

3939
@Rule(key = "S930")
4040
public class ArgumentNumberCheck extends PythonSubscriptionCheck {

python-checks/src/main/java/org/sonar/python/checks/UnnecessaryListCastCheck.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
import org.sonar.plugins.python.api.tree.RegularArgument;
3535
import org.sonar.plugins.python.api.tree.SubscriptionExpression;
3636
import org.sonar.plugins.python.api.tree.Tree;
37-
import org.sonar.python.api.types.v2.matchers.TypeMatcher;
38-
import org.sonar.python.api.types.v2.matchers.TypeMatchers;
37+
import org.sonar.plugins.python.api.types.v2.matchers.TypeMatcher;
38+
import org.sonar.plugins.python.api.types.v2.matchers.TypeMatchers;
3939
import org.sonar.python.quickfix.TextEditUtils;
4040
import org.sonar.python.semantic.v2.SymbolV2;
4141
import org.sonar.python.tree.TreeUtils;

python-frontend/src/main/java/org/sonar/python/api/types/v2/matchers/TypeMatcher.java renamed to python-frontend/src/main/java/org/sonar/plugins/python/api/types/v2/matchers/TypeMatcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonar.python.api.types.v2.matchers;
17+
package org.sonar.plugins.python.api.types.v2.matchers;
1818

1919
import org.sonar.api.Beta;
2020
import org.sonar.plugins.python.api.SubscriptionContext;

python-frontend/src/main/java/org/sonar/python/api/types/v2/matchers/TypeMatcherImpl.java renamed to python-frontend/src/main/java/org/sonar/plugins/python/api/types/v2/matchers/TypeMatcherImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonar.python.api.types.v2.matchers;
17+
package org.sonar.plugins.python.api.types.v2.matchers;
1818

1919
import org.sonar.api.Beta;
2020
import org.sonar.plugins.python.api.SubscriptionContext;

python-frontend/src/main/java/org/sonar/python/api/types/v2/matchers/TypeMatcherUtils.java renamed to python-frontend/src/main/java/org/sonar/plugins/python/api/types/v2/matchers/TypeMatcherUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonar.python.api.types.v2.matchers;
17+
package org.sonar.plugins.python.api.types.v2.matchers;
1818

1919
import java.util.stream.Collector;
2020
import java.util.stream.Collectors;
@@ -23,11 +23,11 @@ public class TypeMatcherUtils {
2323
private TypeMatcherUtils() {
2424
}
2525

26-
public static Collector<TypeMatcher, ?, TypeMatcher> allCollector() {
26+
public static Collector<TypeMatcher, ?, TypeMatcher> allCollector() {
2727
return Collectors.collectingAndThen(Collectors.toList(), TypeMatchers::all);
2828
}
2929

30-
public static Collector<TypeMatcher, ?, TypeMatcher> anyCollector() {
30+
public static Collector<TypeMatcher, ?, TypeMatcher> anyCollector() {
3131
return Collectors.collectingAndThen(Collectors.toList(), TypeMatchers::any);
3232
}
3333
}

python-frontend/src/main/java/org/sonar/python/api/types/v2/matchers/TypeMatchers.java renamed to python-frontend/src/main/java/org/sonar/plugins/python/api/types/v2/matchers/TypeMatchers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonar.python.api.types.v2.matchers;
17+
package org.sonar.plugins.python.api.types.v2.matchers;
1818

1919
import com.google.common.annotations.VisibleForTesting;
2020
import java.util.Arrays;

python-frontend/src/main/java/org/sonar/python/api/types/v2/matchers/package-info.java renamed to python-frontend/src/main/java/org/sonar/plugins/python/api/types/v2/matchers/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
1717
@ParametersAreNonnullByDefault
18-
package org.sonar.python.api.types.v2.matchers;
18+
package org.sonar.plugins.python.api.types.v2.matchers;
1919

2020
import javax.annotation.ParametersAreNonnullByDefault;
2121

python-frontend/src/main/java/org/sonar/python/semantic/v2/types/TypeInferenceMatchers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import java.util.Arrays;
2020
import org.sonar.plugins.python.api.types.v2.PythonType;
21-
import org.sonar.python.api.types.v2.matchers.TypeMatchers;
21+
import org.sonar.plugins.python.api.types.v2.matchers.TypeMatchers;
2222
import org.sonar.python.types.v2.matchers.AnyTypePredicate;
2323
import org.sonar.python.types.v2.matchers.HasFQNPredicate;
2424
import org.sonar.python.types.v2.matchers.HasMemberPredicate;

python-frontend/src/test/java/org/sonar/python/api/types/v2/matchers/MatchersTestUtils.java renamed to python-frontend/src/test/java/org/sonar/plugins/python/api/types/v2/matchers/MatchersTestUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonar.python.api.types.v2.matchers;
17+
package org.sonar.plugins.python.api.types.v2.matchers;
1818

1919
import org.mockito.Mockito;
2020
import org.sonar.plugins.python.api.TriBool;

python-frontend/src/test/java/org/sonar/python/api/types/v2/matchers/TypeMatcherImplTest.java renamed to python-frontend/src/test/java/org/sonar/plugins/python/api/types/v2/matchers/TypeMatcherImplTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* You should have received a copy of the Sonar Source-Available License
1515
* along with this program; if not, see https://sonarsource.com/license/ssal/
1616
*/
17-
package org.sonar.python.api.types.v2.matchers;
17+
package org.sonar.plugins.python.api.types.v2.matchers;
1818

1919
import java.util.Set;
2020
import javax.annotation.Nullable;
@@ -36,7 +36,7 @@
3636
import org.sonar.python.types.v2.matchers.TypePredicateContext;
3737

3838
import static org.assertj.core.api.Assertions.assertThat;
39-
import static org.sonar.python.api.types.v2.matchers.MatchersTestUtils.createTypeMatcher;
39+
import static org.sonar.plugins.python.api.types.v2.matchers.MatchersTestUtils.createTypeMatcher;
4040

4141
class TypeMatcherImplTest {
4242

0 commit comments

Comments
 (0)