Skip to content

Commit

Permalink
DROP: testing file
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoreliovlabs committed Sep 25, 2024
1 parent f007ee9 commit 6527bbf
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/code_quality_check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Code Convention Verification
name: Code Quality Check

on:
push:
Expand All @@ -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
Expand All @@ -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
14 changes: 14 additions & 0 deletions rskj-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6527bbf

Please sign in to comment.