Skip to content

Commit

Permalink
Updated IgnoredPatterns & Added support for more Rewrite recipes (#977)
Browse files Browse the repository at this point in the history
- Updated IgnoredPatterns 
- Added support for more Rewrite recipes

---------

Co-authored-by: Fabian Krüger <[email protected]>
  • Loading branch information
shresthaujjwal and fabapp2 authored Nov 20, 2023
1 parent 1f4eea2 commit a3850af
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 28 deletions.
48 changes: 23 additions & 25 deletions sbm-support-rewrite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,15 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-bom</artifactId>
<version>${rewrite.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -107,48 +113,49 @@
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-maven</artifactId>
<version>${rewrite.version}</version>
<artifactId>rewrite-gradle</artifactId>
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-java</artifactId>
<version>${rewrite.version}</version>
<artifactId>rewrite-groovy</artifactId>
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-java-17</artifactId>
<version>${rewrite.version}</version>
<artifactId>rewrite-hcl</artifactId>
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-java</artifactId>
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-json</artifactId>
<version>${rewrite.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-yaml</artifactId>
<version>${rewrite.version}</version>
<artifactId>rewrite-maven</artifactId>
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-hcl</artifactId>
<version>${rewrite.version}</version>
<artifactId>rewrite-properties</artifactId>
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-protobuf</artifactId>
<version>${rewrite.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-xml</artifactId>
<version>${rewrite.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-properties</artifactId>
<version>${rewrite.version}</version>
<artifactId>rewrite-yaml</artifactId>
</dependency>
<dependency>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>${rewrite-maven-plugin.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down Expand Up @@ -183,13 +190,6 @@
<artifactId>commons-cli</artifactId>
<version>1.4</version>
</dependency>

<dependency>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>${rewrite-maven-plugin.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId>
Expand Down Expand Up @@ -274,7 +274,6 @@
</dependency>
<!-- END: Required by PrivateArtifactRepositoryTest -->
</dependencies>

<build>
<pluginManagement>
<plugins>
Expand All @@ -295,7 +294,6 @@
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ public class ParserProperties {
/**
* Comma-separated list of patterns used to create PathMatcher to exclude paths from being parsed.
*/
private Set<String> ignoredPathPatterns = Set.of("**/target/**", "target/**", "**/.idea/**", ".idea/**", ".mvn/**", "**/.mvn/**");
private Set<String> ignoredPathPatterns = Set.of("**/target/**", "target/**", "**/.idea/**", ".idea/**", "**/.git/**", ".git/**", ".mvn/**", "**/.mvn/**", "node_modules/**", "**/node_modules/**");

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ parser.sizeThresholdMb=10
parser.runPerSubmodule=false
parser.failOnInvalidActiveRecipes=true
parser.activeProfiles=default
parser.ignoredPathPatterns=**.idea/**,**.git/**,**/target/**,target/**
parser.ignoredPathPatterns=**/.idea/**,.idea/**,**/.git/**,.git/**,**/.mvn/**,.mvn/**,**/target/**,target/**,**/node_modules/**,node_modules/**
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void defaultActiveProfiles() {
@Test
@DisplayName("parser.ignoredPathPatterns")
void defaultIgnoredPathPatterns() {
assertThat(parserProperties.getIgnoredPathPatterns()).containsExactlyInAnyOrder("**.idea/**", "**.git/**", "**/target/**", "target/**");
assertThat(parserProperties.getIgnoredPathPatterns()).containsExactlyInAnyOrder("**/target/**", "target/**", "**/.idea/**", ".idea/**", "**/.git/**", ".git/**", ".mvn/**", "**/.mvn/**", "node_modules/**", "**/node_modules/**");
}

}
Expand Down

0 comments on commit a3850af

Please sign in to comment.