sort module-info
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng cách xem lại các ví dụ về module-info.java trong issue và phần 7.7 của JLS được liên kết để xác định thứ tự bắt buộc của các directive và modifier. Công việc được hoàn tất khi các khai báo module được sắp xếp nhất quán, với các nhóm riêng cho requires, requires static và requires transitive, đồng thời exports và opens được sắp xếp phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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;
}
- Ngôn ngữ chính
- Java
- Star
- 1.2k
- Fork
- 123
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 35
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jhipster/prettier-java
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
jhipster/prettier-java#1113 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
jhipster/prettier-java#1114 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Text block containing a comment-like line with " or \ fails with "Comment was not printed"Có thể đã có người làm @sean0407 đã nhận 1 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
jhipster/prettier-java#1112 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
JEP 401 Support value keywordĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
jhipster/prettier-java#1031 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Adds needlessly parenthesesCó thể đã có người làm @braxtonzhangio đã nhận 74 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
jhipster/prettier-java#1001 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của jhipster/prettier-java
Issue tương tự
-
human-required sync-failed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Azure/osdu-spi-file#63 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
frontend quick win
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
CodeForPhilly/benefit-decision-toolkit#571 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
approved
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
checkstyle/checkstyle#22129 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add Hardcharger JDBC driverCó thể đã có người làm @prmoore77 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày