Skip to content

Commit

Permalink
misc: contrived update of copyright of some old files
Browse files Browse the repository at this point in the history
  • Loading branch information
ice1000 committed Dec 22, 2024
1 parent 5757ddd commit 9208962
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2021 Yinsen (Tesla) Zhang.
// Copyright (c) 2020-2024 Tesla (Yinsen) Zhang.
// Use of this source code is governed by the MIT license that can be found in the LICENSE.md file.
package org.aya.cli.library.json;

Expand All @@ -9,7 +9,7 @@
public sealed interface LibraryDependency {
@NotNull String depName();

record DepVersion(@NotNull String depName, @NotNull String version) implements LibraryDependency { }
record DepGithub(@NotNull String depName, @NotNull String repo) implements LibraryDependency { }
record DepFile(@NotNull String depName, @NotNull Path depRoot) implements LibraryDependency { }
record DepVersion(@Override @NotNull String depName, @NotNull String version) implements LibraryDependency { }
record DepGithub(@Override @NotNull String depName, @NotNull String repo) implements LibraryDependency { }

Check warning on line 13 in cli-impl/src/main/java/org/aya/cli/library/json/LibraryDependency.java

View check run for this annotation

Codecov / codecov/patch

cli-impl/src/main/java/org/aya/cli/library/json/LibraryDependency.java#L12-L13

Added lines #L12 - L13 were not covered by tests
record DepFile(@Override @NotNull String depName, @NotNull Path depRoot) implements LibraryDependency { }
}
2 changes: 1 addition & 1 deletion cli-impl/src/test/java/org/aya/test/LibraryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static void main(String... args) throws IOException {
private static @NotNull CompilerFlags makeFlagsForPretty() {
var prettyInfo = new CompilerFlags.PrettyInfo(
true, false, false, false, CliEnums.PrettyStage.literate,
CliEnums.PrettyFormat.html, AyaPrettierOptions.pretty(), new RenderOptions(), null
CliEnums.PrettyFormat.html, AyaPrettierOptions.pretty(), new RenderOptions(), null, null, null
);
return new CompilerFlags(CompilerFlags.Message.ASCII, false, false, prettyInfo, SeqView.empty(), null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public TestLibraryOwner(@NotNull LibraryConfig underlyingLibrary) {
libRoot.resolve("src"),
libRoot.resolve("build"),
libRoot.resolve("build/out"),
new LibraryConfig.LibraryLiterateConfig(new LiteratePrettierOptions(), "11.4.5.14", libRoot.resolve("literate")),
new LibraryConfig.LibraryLiterateConfig(new LiteratePrettierOptions(), null, "11.4.5.14", libRoot.resolve("literate")),
ImmutableSeq.empty()
);
}
Expand Down
22 changes: 10 additions & 12 deletions pretty/src/main/java/org/aya/pretty/printer/Printer.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
// Copyright (c) 2020-2021 Yinsen (Tesla) Zhang.
// Copyright (c) 2020-2024 Tesla (Yinsen) Zhang.
// Use of this source code is governed by the MIT license that can be found in the LICENSE.md file.
package org.aya.pretty.printer;

import org.aya.pretty.doc.Doc;
import org.jetbrains.annotations.NotNull;

/**
* This class was designed to support various PrettyPrint backend.
* Example usage:
* <pre>
* public class HtmlPrinter implements Printer[HtmlPrinterConfig] {}
* </pre>
* <p>
* For a more practical example, see {@link org.aya.pretty.backend.string.StringPrinter}
*
* @author kiva
*/
/// This class was designed to support various PrettyPrint backend.
/// Example usage:
/// ```java
/// public class HtmlPrinter implements Printer<HtmlPrinterConfig> {}
/// ```
///
/// For a more practical example, see [org.aya.pretty.backend.string.StringPrinter]
///
/// @author kiva
public interface Printer<Out, Config extends PrinterConfig> {
/**
* Render a {@link Doc} object with a config.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020-2022 Yinsen (Tesla) Zhang.
// Copyright (c) 2020-2024 Tesla (Yinsen) Zhang.
// Use of this source code is governed by the MIT license that can be found in the LICENSE.md file.
package org.aya.util.reporter;

Expand All @@ -22,7 +22,5 @@ public void reportNow() {
problems.clear();
}

@Override public void close() {
reportNow();
}
@Override public void close() { reportNow(); }
}

0 comments on commit 9208962

Please sign in to comment.