sort module-info
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、issue内のmodule-info.javaの例とリンク先のJLSセクション7.7を確認し、ディレクティブと修飾子の必要な順序を決定します。完了条件は、モジュール宣言が一貫してソートされ、requires、requires static、requires transitiveがそれぞれ別のグループになっており、exportsとopensも適切に並べられていることです。
索引モデルが issue の本文から書いたものです。
説明
Prettier-Java 2.5.0
Input:
module com.xenoterracide.tools.java {
exports com.xenoterracide.tools0.java.function;
exports com.xenoterracide.tools0.java.annotation;
requires java.base;
requires jakarta.annotation;
}
Output:
module com.xenoterracide.tools.java {
exports com.xenoterracide.tools0.java.function;
exports com.xenoterracide.tools0.java.annotation;
requires java.base;
requires jakarta.annotation;
}
Expected behavior:
some kind of sorting, for convienience, like sorting imports. Note: I don't think functionally the order matters, but I've linked the JLS spec in case it defines it. It does seem to show an order (that's not alphabetic only). Also I don't have an opinion other than it should sort and should conform to JLS.
I'll be honest, I haven't really read this spec, so please verify my output conforms.. but it looks like it should be as follows. Obviously my example is not comprehensive https://docs.oracle.com/javase/specs/jls/se9/html/jls-7.html#jls-7.7
module com.xenoterracide.tools.java {
requires jakarta.annotation;
requires java.base;
exports com.xenoterracide.tools0.java.annotation;
exports com.xenoterracide.tools0.java.function;
}
note: I think it's acceptable just to make this an alpha sort with some grouping, e.g. requires and requires static and requires transient are different groups. requires stuff shouldn't be mixed next to requires static. This is currently one of my most complex examples.
import org.jspecify.annotations.NullMarked;
/**
* JPA utilities.
*/
@NullMarked module com.xenoterracide.commons.jpa {
exports com.xenoterracide.commons.jpa;
exports com.xenoterracide.commons.jpa.annotation;
exports com.xenoterracide.commons.jpa.util;
exports com.xenoterracide.commons.jpa.transaction to spring.beans, spring.context;
opens com.xenoterracide.commons.jpa to org.hibernate.orm.core, spring.core, org.hibernate.validator;
opens com.xenoterracide.commons.jpa.transaction to spring.core;
requires org.apache.commons.lang3;
requires spring.data.commons;
requires spring.beans;
requires spring.context;
requires spring.tx;
requires org.hibernate.orm.envers;
requires static org.jspecify;
requires static com.xenoterracide.tools.java;
requires static jakarta.annotation;
requires static org.jmolecules.architecture.layered;
requires transitive jakarta.persistence;
requires transitive jakarta.validation;
requires transitive com.xenoterracide.model;
requires org.jmolecules.ddd;
}
- 主要言語
- Java
- スター
- 1.2k
- フォーク
- 123
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 35
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
jhipster/prettier-java のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
jhipster/prettier-java#1113 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
jhipster/prettier-java#1114 ·
メンテナーはふだん 2 日以内に返信
-
Text block containing a comment-like line with " or \ fails with "Comment was not printed"対応中かも @sean0407 が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
jhipster/prettier-java#1112 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
jhipster/prettier-java#1031 ·
メンテナーはふだん 2 日以内に返信
-
Adds needlessly parentheses対応中かも @braxtonzhangio が 74 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 67/100
jhipster/prettier-java#1001 ·
メンテナーはふだん 2 日以内に返信
jhipster/prettier-java の issue をすべて見る
似ている issue
-
human-required sync-failed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Azure/osdu-spi-file#63 ·
メンテナーはふだん 1 日以内に返信
-
frontend quick win
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
CodeForPhilly/benefit-decision-toolkit#571 ·
メンテナーはふだん 1 日以内に返信
-
approved
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
checkstyle/checkstyle#22129 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Add Hardcharger JDBC driver対応中かも @prmoore77 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信