Skip to content

Commit 8707047

Browse files
committed
format
1 parent aaf38c9 commit 8707047

File tree

6 files changed

+25
-14
lines changed

6 files changed

+25
-14
lines changed

.editorconfig

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
root = true
22

33
[*]
4-
charset=utf-8
5-
end_of_line=lf
6-
insert_final_newline=true
7-
indent_style=space
8-
indent_size=4
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
99
ij_any_block_comment_add_space = false
1010
ij_any_block_comment_at_first_column = false
1111
ij_any_line_comment_at_first_column = false
1212
ij_any_line_comment_add_space = true
1313

1414
[*.bat]
15-
end_of_line=crlf
15+
end_of_line = crlf
16+
17+
[*.yaml]
18+
indent_size = 2
1619

1720
[*.java]
1821
ij_continuation_indent_size = 4
1922
ij_java_class_count_to_use_import_on_demand = 999999
2023
ij_java_insert_inner_class_imports = false
2124
ij_java_names_count_to_use_import_on_demand = 999999
22-
ij_java_imports_layout = *,|,$*
25+
ij_java_imports_layout = *, |, $*
2326
ij_java_generate_final_locals = true
2427
ij_java_generate_final_parameters = true

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ out/
3232
*~
3333

3434
# other stuff
35-
run/
3635
logs/
3736

3837
!gradle/wrapper/gradle-wrapper.jar

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Typewriter
1+
# typewriter
22

33
Generic search and replace tool that applies to Java source code files.
4-
Built-in features include import statements parsing and some presets to work with enum and switch.
4+
Built-in features include import statement parsing and some presets to work with enum and switch.

build.gradle.kts

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
2+
import org.gradle.api.tasks.testing.logging.TestLogEvent
3+
14
plugins {
25
java
36
`maven-publish`
@@ -38,6 +41,12 @@ tasks {
3841
}
3942
}
4043
inputs.files(testData.output.files)
44+
45+
testLogging {
46+
showStackTraces = true
47+
exceptionFormat = TestExceptionFormat.FULL
48+
events(TestLogEvent.STANDARD_OUT)
49+
}
4150
}
4251

4352
compileTestJava {

src/main/java/io/papermc/typewriter/SourceRewriter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ default boolean registerFor(SourceFile file) {
1818
/**
1919
* Apply this rewriter to a source file
2020
*
21-
* @param parent the parent of the source file (a sourceset path)
21+
* @param parent the parent of the source file (a source set path)
2222
* @param file the source file
2323
* @throws IOException if an I/O error occur
2424
*/

src/main/java/io/papermc/typewriter/replace/ReplaceOptions.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public record ReplaceOptions(
2626
* @param startCommentMarker the start comment where the replacement will start to happen
2727
* @param endCommentMarker the end comment where the replacement will terminate
2828
* @return the builder
29-
* @apiNote the singe line comment prefix ("// ") is not needed in the comment marker and
29+
* @apiNote single line comment prefix ("// ") is not needed in the comment and
3030
* cannot be changed here.
3131
*/
3232
@Contract(value = "_, _ -> new", pure = true)
@@ -37,9 +37,9 @@ public static Builder between(String startCommentMarker, String endCommentMarker
3737
/**
3838
* Specify the replace options for a rewriter.
3939
*
40-
* @param commentMarker the only comment marker where the replacement will be delimited by
40+
* @param commentMarker the only comment where the replacement will be delimited by (twice)
4141
* @return the builder
42-
* @apiNote the singe line comment prefix ("// ") is not needed in the comment marker and
42+
* @apiNote single line comment prefix ("// ") is not needed in the comment and
4343
* cannot be changed here.
4444
*/
4545
@Contract(value = "_ -> new", pure = true)

0 commit comments

Comments
 (0)