Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: put space after annotation in UnannClassTypes #455

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- uses: actions/setup-java@v1
with:
java-version: '11.x'
- name: Install dependencies
run: yarn
- name: Run CI
Expand All @@ -56,6 +59,9 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- uses: actions/setup-java@v1
with:
java-version: '11.x'
- name: Install dependencies
run: yarn
- name: Run e2e tests
Expand Down
4 changes: 0 additions & 4 deletions packages/java-parser/scripts/clone-samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ const sampleRepos = [
repoUrl: "https://github.com/jhipster/jhipster-sample-app-dto",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-couchbase",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-cassandra",
branch: "main"
Expand Down
1 change: 0 additions & 1 deletion packages/java-parser/test/samples-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ describe("The Java Parser", () => {
createSampleSpecs("jhipster-online");
createSampleSpecs("jhipster-sample-app");
createSampleSpecs("jhipster-sample-app-cassandra");
createSampleSpecs("jhipster-sample-app-couchbase");
createSampleSpecs("jhipster-sample-app-dto");
createSampleSpecs("jhipster-sample-app-elasticsearch");
createSampleSpecs("jhipster-sample-app-gateway");
Expand Down
4 changes: 0 additions & 4 deletions packages/prettier-plugin-java/scripts/clone-samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ const jhipster2 = [
repoUrl: "https://github.com/jhipster/jhipster-sample-app-dto",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-couchbase",
branch: "main"
},
{
repoUrl: "https://github.com/jhipster/jhipster-sample-app-cassandra",
branch: "main"
Expand Down
1 change: 1 addition & 0 deletions packages/prettier-plugin-java/src/printers/classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ class ClassesPrettierVisitor {
currentSegment = [];
} else if (token.name === "annotation") {
currentSegment.push(this.visit([token]));
currentSegment.push(" ");
} else {
currentSegment.push(token);
if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const { testRepositorySample } = require("../test-utils");
const jhipsterRepository = [
"jhipster-sample-app-elasticsearch",
"jhipster-sample-app-dto",
"jhipster-sample-app-couchbase",
"jhipster-sample-app-cassandra",
"jhipster-sample-app-mongodb",
"jhipster-sample-app-react"
Expand Down
10 changes: 10 additions & 0 deletions packages/prettier-plugin-java/test/unit-test/bug-fixes/_input.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class T {
// Fix for https://github.com/jhipster/prettier-java/issues/453
SomeClass.@Valid SomeInnerClass someInnerClass = someClass.getInteractions().get(0);

// Fix for https://github.com/jhipster/prettier-java/issues/444
void process(
Map.@NonNull Entry<String, SkeletonConfiguration> entry,
@NonNull Map<String, Object> context
) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class T {

// Fix for https://github.com/jhipster/prettier-java/issues/453
SomeClass.@Valid SomeInnerClass someInnerClass = someClass
.getInteractions()
.get(0);

// Fix for https://github.com/jhipster/prettier-java/issues/444
void process(
Map.@NonNull Entry<String, SkeletonConfiguration> entry,
@NonNull Map<String, Object> context
) {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
describe("prettier-java", () => {
require("../../test-utils").testSample(__dirname);
});