From 6527bbf351111a30991bf01338fc596b4ecb29c6 Mon Sep 17 00:00:00 2001 From: Reynold Morel Date: Wed, 25 Sep 2024 15:37:49 -0400 Subject: [PATCH] DROP: testing file --- .github/workflows/code_quality_check.yml | 19 +++++++++++++++---- rskj-core/build.gradle | 14 ++++++++++++++ .../co/rsk/config/GarbageCollectorConfig.java | 3 +++ 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code_quality_check.yml b/.github/workflows/code_quality_check.yml index 79a580d338e..782e0a618c8 100644 --- a/.github/workflows/code_quality_check.yml +++ b/.github/workflows/code_quality_check.yml @@ -1,4 +1,4 @@ -name: Code Convention Verification +name: Code Quality Check on: push: @@ -14,7 +14,18 @@ jobs: checkstyle-and-spotless: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout branch + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} # Checkout the branch of the pull request + fetch-depth: 0 + + - name: List Changed Files + run: | + echo "Current branch: ${{ github.head_ref }}" + echo "Changed files:" + git diff --name-only origin/${{ github.base_ref }}...${{ github.head_ref }} + - name: Setup Java & Gradle uses: actions/setup-java@v4 @@ -38,8 +49,8 @@ jobs: - name: Run Checkstyle run: | - ./gradlew clean rskj-core:checkstyleMain checkstyleTest + ./gradlew clean rskj-core:checkstyleMain checkstyleTest --info - name: Run Spotless Check run: | - ./gradlew clean rskj-core:spotlessCheck + ./gradlew clean rskj-core:spotlessCheck --info diff --git a/rskj-core/build.gradle b/rskj-core/build.gradle index 0398a56048b..fb02de97ae2 100644 --- a/rskj-core/build.gradle +++ b/rskj-core/build.gradle @@ -71,6 +71,12 @@ def getFilteredFiles() { def uncommittedFiles = outputDiff.toString().trim().split('\n').toList().unique() def stagedFiles = outputStaged.toString().trim().split('\n').toList().unique() def allFiles = committedFiles + uncommittedFiles + stagedFiles + + println("Committed files: ${committedFiles}") + println("Uncommitted files: ${uncommittedFiles}") + println("Staged files: ${stagedFiles}") + + allFiles = allFiles.unique().findAll { file -> file } allFiles = allFiles.findAll { file -> @@ -86,8 +92,16 @@ def configureCheckstyleTask(Checkstyle task, File sourceDir) { def filteredFilesCheckstyle = files.findAll { file -> def filePath = file.toPath().normalize() def isUnderSourceDir = filePath.startsWith(sourceDirPath) && !filePath.equals(sourceDirPath) + + + println "Checking file: ${file.absolutePath}" + println "File path: ${filePath}, Under source dir: ${isUnderSourceDir}" + isUnderSourceDir } + + println "Filtered Checkstyle files: ${filteredFilesCheckstyle.collect { it.absolutePath }}" + task.source = project.files(filteredFilesCheckstyle) task.classpath = project.files( sourceSets.main.output.classesDirs, diff --git a/rskj-core/src/main/java/co/rsk/config/GarbageCollectorConfig.java b/rskj-core/src/main/java/co/rsk/config/GarbageCollectorConfig.java index 518ec63dd13..131244724d8 100644 --- a/rskj-core/src/main/java/co/rsk/config/GarbageCollectorConfig.java +++ b/rskj-core/src/main/java/co/rsk/config/GarbageCollectorConfig.java @@ -28,6 +28,9 @@ public class GarbageCollectorConfig { private final int blocksPerEpoch; private final int numberOfEpochs; + + //asdasdasdsdsd + public GarbageCollectorConfig(boolean enabled, int blocksPerEpoch, int numberOfEpochs) { this.enabled = enabled; this.blocksPerEpoch = blocksPerEpoch;