Skip to content

Commit

Permalink
Merge branch 'INRIA:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
GooDer authored Oct 31, 2024
2 parents a5ac273 + 692c4d4 commit 4987c68
Show file tree
Hide file tree
Showing 19 changed files with 62 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
with:
fail-mode: true
- name: Use Maven dependency cache
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ~/.m2/repository
# We use a unique key and restore from the base one, to ensure that
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ on:
required: true
type: string

permissions:
id-token: write # for verifying identity in attestation process
attestations: write # to push attestation

jobs:
jreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
token: ${{ secrets.JRELEASER_GITHUB_TOKEN }}
Expand All @@ -29,6 +33,11 @@ jobs:
JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME: ${{ secrets.JRELEASER_NEXUS2_MAVEN_CENTRAL_USERNAME }}
JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD: ${{ secrets.JRELEASER_NEXUS2_MAVEN_CENTRAL_PASSWORD }}

- name: Sign artifacts with sigstore/cosign
uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
with:
subject-path: './target/staging-deploy/**/*.jar'

# Log failures
- name: JReleaser release output
if: always()
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/qodana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,44 @@ jobs:
runs-on: ubuntu-latest
name: code-quality qodana
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@a040a784cc28cb9cabdf884c4e8c32d0aa3fcdb3 # v2023.3.2
uses: JetBrains/qodana-action@31d6f3309b31c566758e1314a3d9ef0dff75ecbd # v2024.2.6
with:
args: --source-directory,./src/main/java , --fail-threshold, 0
post-pr-comment: "false"
- uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3
- uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
code-quality-spoon-javadoc:
runs-on: ubuntu-latest
name: code-quality spoon-javadoc qodana
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: 'Qodana Scan (spoon-javadoc)'
uses: JetBrains/qodana-action@a040a784cc28cb9cabdf884c4e8c32d0aa3fcdb3 # v2023.3.2
uses: JetBrains/qodana-action@31d6f3309b31c566758e1314a3d9ef0dff75ecbd # v2024.2.6
with:
args: --source-directory,./spoon-javadoc/src/main/java , --fail-threshold, 0
post-pr-comment: "false"
- uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3
- uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
code-quality-spoon-control-flow:
runs-on: ubuntu-latest
name: code-quality spoon-controlflow qodana
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: 'Qodana Scan (spoon-control-flow)'
uses: JetBrains/qodana-action@a040a784cc28cb9cabdf884c4e8c32d0aa3fcdb3 # v2023.3.2
uses: JetBrains/qodana-action@31d6f3309b31c566758e1314a3d9ef0dff75ecbd # v2024.2.6
with:
args: --source-directory,./spoon-control-flow/src/main/java , --fail-threshold, 0
post-pr-comment: "false"
- uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3
- uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
6 changes: 3 additions & 3 deletions .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
name: Generate and store SBOM
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0
with:
java-version: 17
distribution: ${{ env.JAVA_DISTRIBUTION }}
Expand All @@ -34,7 +34,7 @@ jobs:
run: echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
shell: bash
- name: Use Maven dependency cache
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/pom.xml') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
egress-policy: audit

- name: "Checkout code"
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

Expand Down Expand Up @@ -71,6 +71,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
with:
sarif_file: results.sarif
18 changes: 9 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Setup env
Expand All @@ -53,10 +53,10 @@ jobs:
- name: Disable Git's autocrlf
run: git config --global core.autocrlf false
- name: git checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: 'temurin'
java-version: '17'
Expand All @@ -73,7 +73,7 @@ jobs:
name: Test with coverage
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Setup env
Expand All @@ -92,7 +92,7 @@ jobs:
name: Extra checks
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Setup env
Expand All @@ -111,7 +111,7 @@ jobs:
name: Javadoc quality
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Setup env
Expand All @@ -129,7 +129,7 @@ jobs:
name: reproducible-builds
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Setup env
Expand All @@ -144,7 +144,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Setup env
Expand All @@ -160,7 +160,7 @@ jobs:
name: Codegeneration
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Setup env
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.38.0</version>
<version>3.39.0</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.platform</groupId>
Expand Down Expand Up @@ -91,7 +91,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.18.0</version>
<version>2.18.1</version>
</dependency>
<dependency>
<!-- support for compressed serialized ASTs -->
Expand Down Expand Up @@ -120,7 +120,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.11</version>
<version>1.5.12</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -198,7 +198,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
<configuration>
<failsOnError>true</failsOnError>
<consoleOutput>true</consoleOutput>
Expand Down
4 changes: 4 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ exclude:
- src/main/java/spoon/support/visitor/clone/CloneBuilder.java
- src/main/java/spoon/support/visitor/clone/CloneVisitor.java
- src/main/java/spoon/reflect/meta/impl/ModelRoleHandlers.java


#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
linter: jetbrains/qodana-jvm-community:latest
2 changes: 1 addition & 1 deletion spoon-control-flow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
<configuration>
<failsOnError>true</failsOnError>
<configLocation>../checkstyle.xml</configLocation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void testSegment(AbstractProcessor processor) throws Exception {
// "nestedIfSomeNotReturning", false);

Factory factory = new SpoonMetaFactory().buildNewFactory(
this.getClass().getResource("/control-flow").toURI().getPath(), 7);
this.getClass().getResource("/control-flow").toURI().getPath(), 11);
ProcessingManager pm = new QueueProcessingManager(factory);
pm.addProcessor(processor);
pm.process(factory.getModel().getRootPackage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static ControlFlowGraph buildGraph(String folder, final String methodName
throws Exception {
final ControlFlowBuilder visitor = new ControlFlowBuilder();

Factory factory = new SpoonMetaFactory().buildNewFactory(folder, 5);
Factory factory = new SpoonMetaFactory().buildNewFactory(folder, 11);
ProcessingManager pm = new QueueProcessingManager(factory);
pm.addProcessor(new AbstractProcessor<CtMethod>() {
@Override
Expand Down
2 changes: 1 addition & 1 deletion spoon-dataflow/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
implementation group: 'fr.inria.gforge.spoon', name: 'spoon-core', version: '+'
implementation group: 'commons-cli', name: 'commons-cli', version: '1.9.0'
implementation group: 'tools.aqua', name: 'z3-turnkey', version: '4.13.0.1'
testImplementation("org.junit.jupiter:junit-jupiter:5.11.2")
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
}

application {
Expand Down
2 changes: 1 addition & 1 deletion spoon-decompiler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
<configuration>
<failsOnError>true</failsOnError>
<configLocation>../checkstyle.xml</configLocation>
Expand Down
12 changes: 6 additions & 6 deletions spoon-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.11.2</version>
<version>5.11.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.11.2</version>
<version>5.11.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.11.2</version>
<version>1.11.3</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -235,7 +235,7 @@
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.0</version>
<version>3.8.1</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
Expand All @@ -251,7 +251,7 @@
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.7.0</version>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
Expand All @@ -263,7 +263,7 @@
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.20.0</version>
<version>3.21.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion spoon-smpl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
<configuration>
<failsOnError>true</failsOnError>
<configLocation>../checkstyle.xml</configLocation>
Expand Down
2 changes: 1 addition & 1 deletion spoon-visualisation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.11.2</version>
<version>5.11.3</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 2 additions & 0 deletions src/test/java/spoon/test/api/NoClasspathTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import spoon.support.visitor.SignaturePrinter;
import spoon.test.api.testclasses.Bar;
import spoon.testing.assertions.SpoonAssertions;
import spoon.testing.utils.GitHubIssue;
import spoon.testing.utils.ModelTest;

import static java.util.function.Predicate.not;
Expand Down Expand Up @@ -209,6 +210,7 @@ public void testInheritanceInNoClassPathWithClasses() {
assertTrue(field.getType().isSubtypeOf(myInterfaceReference));
}

@GitHubIssue(issueNumber = 5977, fixed = false)
@ModelTest("src/test/resources/noclasspath/issue5591/DiamondConstructorCallTypeInference.java")
void testJdtFactoryMethodsForDiamond(CtModel model) {
// contract: Leftover <factory> methods from JDT's diamond constructor type inference are handled in
Expand Down
Loading

0 comments on commit 4987c68

Please sign in to comment.