Skip to content

Commit 4ace815

Browse files
committed
chore: reformat code
1 parent 77a9136 commit 4ace815

File tree

8 files changed

+17
-11
lines changed

8 files changed

+17
-11
lines changed

src/main/java/com/github/jimschubert/rewrite/docker/internal/DockerfileParser.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
*/
1515
package com.github.jimschubert.rewrite.docker.internal;
1616

17-
import com.github.jimschubert.rewrite.docker.tree.*;
17+
import com.github.jimschubert.rewrite.docker.tree.Docker;
18+
import com.github.jimschubert.rewrite.docker.tree.Space;
1819
import org.openrewrite.Tree;
1920
import org.openrewrite.marker.Markers;
2021

@@ -178,7 +179,7 @@ private Docker.Instruction parseInstruction() {
178179
* Handle heredoc syntax in the line. This is used to handle the case where the line contains heredoc syntax.
179180
* The heredoc syntax is removed from the line and the heredoc content is stored in the parser state.
180181
*
181-
* @param line The line to handle.
182+
* @param line The line to handle.
182183
* @param scanner The scanner to use to read the next lines.
183184
* @return The line without the heredoc syntax.
184185
*/
@@ -228,7 +229,7 @@ private String handleHeredoc(String line, FullLineIterator scanner) {
228229
* Handle leading whitespace of the line. This is used to handle the case where the line starts with whitespace.
229230
* The whitespace is stored in the parser state and removed from the line.
230231
*
231-
* @param line The line to handle.
232+
* @param line The line to handle.
232233
* @param state The parser state.
233234
* @return The line without the leading whitespace.
234235
*/
@@ -245,7 +246,7 @@ private static String handleLeadingWhitespace(String line, ParserState state) {
245246
* Handle right padding of the line. This is used to handle the case where the line ends with whitespace.
246247
* The whitespace is stored in the parser state and removed from the line.
247248
*
248-
* @param line The line to handle.
249+
* @param line The line to handle.
249250
* @param state The parser state.
250251
* @return The line without the right padding.
251252
*/

src/main/java/com/github/jimschubert/rewrite/docker/internal/InstructionParserRegistry.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@
1414
*/
1515
package com.github.jimschubert.rewrite.docker.internal;
1616

17-
import java.util.List;
1817
import com.github.jimschubert.rewrite.docker.internal.parsers.*;
1918

19+
import java.util.List;
20+
21+
/**
22+
* Registry for instruction parsers.
23+
* This class is responsible for managing and providing access to different instruction parsers.
24+
*/
2025
public class InstructionParserRegistry implements ParserRegistry {
2126

2227
private final List<InstructionParser> parsers = List.of(

src/main/java/com/github/jimschubert/rewrite/docker/internal/parsers/CommentParser.java

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

2727
import java.util.List;
2828

29-
public class CommentParser implements InstructionParser{
29+
public class CommentParser implements InstructionParser {
3030
@Override
3131
public boolean supports(String keyword) {
3232
return keyword.equalsIgnoreCase("#");

src/main/java/com/github/jimschubert/rewrite/docker/internal/parsers/EnvInstructionParser.java

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

2525
import java.util.List;
2626

27-
public class EnvInstructionParser implements InstructionParser{
27+
public class EnvInstructionParser implements InstructionParser {
2828
@Override
2929
public boolean supports(String keyword) {
3030
return keyword.equalsIgnoreCase("ENV");

src/main/java/com/github/jimschubert/rewrite/docker/internal/parsers/InstructionParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface InstructionParser {
3434
/**
3535
* Parses a line of a Dockerfile and transforms it into a Docker instruction object.
3636
*
37-
* @param line the line of the Dockerfile to be parsed.
37+
* @param line the line of the Dockerfile to be parsed.
3838
* @param state the current state of the parser which may influence how the line is interpreted.
3939
* @return a Docker instruction object representing the parsed line.
4040
*/

src/main/java/com/github/jimschubert/rewrite/docker/internal/parsers/MaintainerInstructionParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.openrewrite.Tree;
2323
import org.openrewrite.marker.Markers;
2424

25-
public class MaintainerInstructionParser implements InstructionParser{
25+
public class MaintainerInstructionParser implements InstructionParser {
2626
@Override
2727
public boolean supports(String keyword) {
2828
return keyword.equalsIgnoreCase("MAINTAINER");

src/main/java/com/github/jimschubert/rewrite/docker/internal/parsers/RunInstructionParser.java

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

2828
import static com.github.jimschubert.rewrite.docker.internal.ParserUtils.stringToKeyArgs;
2929

30-
public class RunInstructionParser implements InstructionParser{
30+
public class RunInstructionParser implements InstructionParser {
3131
@Override
3232
public boolean supports(String keyword) {
3333
return keyword.equalsIgnoreCase("RUN");

src/main/java/com/github/jimschubert/rewrite/docker/internal/parsers/VolumeInstructionParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import java.util.List;
2626
import java.util.stream.Collectors;
2727

28-
public class VolumeInstructionParser extends CommandLikeInstructionParser{
28+
public class VolumeInstructionParser extends CommandLikeInstructionParser {
2929
@Override
3030
public boolean supports(String keyword) {
3131
return keyword.equalsIgnoreCase("VOLUME");

0 commit comments

Comments
 (0)