Skip to content

Update workflows and configurations for CI and code quality#55

Closed
rabestro wants to merge 6 commits intomasterfrom
chore/versoins-bump
Closed

Update workflows and configurations for CI and code quality#55
rabestro wants to merge 6 commits intomasterfrom
chore/versoins-bump

Conversation

@rabestro
Copy link
Copy Markdown
Owner

@rabestro rabestro commented Apr 1, 2026

What does this implement/fix?

  • Updates GitHub Actions workflows to newer versions.
  • Improves Java configuration for compatibility and optimization.
  • Integrates Qodana configuration and workflow for automated code quality analysis.
  • Adds a .gitattributes file to ensure consistent line endings and handling across platforms.

Why is this necessary?

  • To ensure CI processes are up-to-date and more reliable.
  • To automate code quality checks, enhancing maintainability.
  • To standardize line endings for cross-platform compatibility.

Checklist before requesting review:

  • Ensure all workflows operate as intended.
  • Verify that Qodana analysis integrates seamlessly without issues.
  • Validate that .gitattributes enforces consistent handling.

Summary by CodeRabbit

  • Chores
    • Updated CI/CD pipeline tooling and upgraded the Java runtime to Java 25.
    • Added an automated static code-quality workflow and configuration for continuous analysis.
    • Introduced repository-wide Git attribute rules to enforce consistent line endings, binary handling, and archive export exclusions.

@rabestro rabestro self-assigned this Apr 1, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 736bc328-9b95-4c32-bdf4-612ca07c10b9

📥 Commits

Reviewing files that changed from the base of the PR and between 0eeba37 and 8f0e992.

📒 Files selected for processing (2)
  • .github/workflows/build.yml
  • .github/workflows/qodana_code_quality.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/build.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/qodana_code_quality.yml

📝 Walkthrough

Walkthrough

Added Git metadata and CI updates: a new .gitattributes, updated build workflow versions and Java runtime, a new Qodana GitHub Actions workflow, and a qodana.yaml configuration for static analysis.

Changes

Cohort / File(s) Summary
Git attributes
./.gitattributes
New file: enforces LF line endings for text files, marks many formats as binary, assigns diff=nbdime for *.ipynb, and adds export-ignore rules for metadata/tests.
Build workflow
.github/workflows/build.yml
Updated GitHub Actions versions (actions/checkout v2→v6, actions/setup-java v1→v5, actions/cache v1→v4), switched Java runtime from JDK 17→25 and added distribution: 'temurin'.
Qodana CI workflow
.github/workflows/qodana_code_quality.yml
New workflow: Qodana action configured with QODANA_TOKEN, runs on PRs/pushes/manual dispatch, uses actions/checkout@v4 with full history and PR head SHA, caching and PR comment/annotation options set.
Qodana config
qodana.yaml
New configuration: version: "1.0", qodana.starter profile, project JDK 17, image jetbrains/qodana-jvm-community:2026.1, with commented options for inspections, plugins, and quality gates.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer (push/PR)
  participant GH as GitHub Actions
  participant Repo as Repository
  participant Qodana as Qodana Action
  participant Cache as Cache (actions/cache)

  Dev->>Repo: push or open PR
  Repo->>GH: trigger workflows (build, qodana)
  GH->>Cache: restore caches (gradle, sonar)
  GH->>Repo: checkout (fetch-depth: 0, PR head SHA)
  GH->>Qodana: run JetBrains/qodana-action with QODANA_TOKEN
  Qodana->>Cache: use cache if available
  Qodana->>GH: post annotations/comments (if enabled)
  GH->>Cache: save/update caches
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through commits with glee,
LF footprints left for all to see,
Qodana peers with careful eye,
Java leapt up to twenty-five high,
Pipelines hum — a tidy spree! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: updating GitHub Actions workflows, adding Qodana configuration for code quality analysis, and adding .gitattributes for cross-platform consistency.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/versoins-bump

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (3)
.github/workflows/build.yml (1)

26-31: Inconsistent cache action versions.

The SonarCloud cache was upgraded to actions/cache@v4 but the Gradle cache still uses actions/cache@v1. Consider aligning both to v4 for consistency and to benefit from improvements.

♻️ Suggested fix
       - name: Cache Gradle packages
-        uses: actions/cache@v1
+        uses: actions/cache@v4
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
           restore-keys: ${{ runner.os }}-gradle
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build.yml around lines 26 - 31, Update the Gradle cache
step "Cache Gradle packages" to use actions/cache@v4 to match the SonarCloud
cache and get latest improvements; locate the step that currently has uses:
actions/cache@v1 and change the version tag to actions/cache@v4, keeping the
existing with: keys (path, key, restore-keys) intact so behavior is unchanged.
.gitattributes (2)

28-41: Consider adding Java-specific binary patterns.

For a Java project, you may want to include common Java binary artifacts to prevent accidental line-ending modifications.

📦 Suggested additions for Java projects
 *.pdf     binary
+
+# Java binary files
+*.jar     binary
+*.class   binary
+*.war     binary
+*.ear     binary
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitattributes around lines 28 - 41, The .gitattributes currently lists
common image and archive binaries but misses Java build artifacts; update
.gitattributes to include Java-specific binary patterns such as *.class, *.jar,
*.war, *.ear, *.nar and the build output directory pattern like /target/** to
ensure Java compilations and packaged binaries are treated as binary (preventing
line-ending normalization and corruption). Locate the .gitattributes file and
add those patterns alongside the existing entries so Git will ignore line-ending
conversions for Java artifacts.

4-5: Python-specific settings may not be needed for this Java project.

This appears to be a Java/Gradle project based on the repository structure. The Python-specific patterns (*.py, *.pyc, uv.lock, /.pytest_cache/) are unnecessary but harmless.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitattributes around lines 4 - 5, Remove the unnecessary Python-specific
entries from .gitattributes by deleting the patterns like "*.py", "*.pyc",
"uv.lock" and "/.pytest_cache/" so the file only contains attributes relevant to
this Java/Gradle repo; keep or add Java/Gradle-specific settings if needed and
ensure .gitattributes reflects the project's actual languages and tooling.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build.yml:
- Around line 16-19: The workflow step using actions/setup-java@v5 is missing
the required distribution input and has a mismatch between the step name and
java-version; update the step to include a distribution (e.g., distribution:
temurin) and make the java-version consistent with the step name (set
java-version: 17) or rename the step to match the desired version (java-version:
25), ensuring the keys actions/setup-java@v5, distribution, and java-version are
present and consistent.

In @.github/workflows/qodana_code_quality.yml:
- Around line 10-13: The workflow's push trigger currently lists a development
branch "chore/versoins-bump" under the push: branches: section; remove that
branch name from the branches array so only intended branches (e.g., "master")
remain, ensuring the push trigger does not run for the temporary feature/test
branch—update the branches list under the push key and commit the change.
- Around line 27-28: The workflow currently references a non-existent Qodana
action tag in the step that sets up the scan (the line with "uses:
JetBrains/qodana-action@v2026.1"); update that "uses" value to a valid, existing
release such as "JetBrains/qodana-action@v2025.3" (or another stable tag from
the JetBrains/qodana-action releases page) so the 'Qodana Scan' step uses a real
published version.

In `@qodana.yaml`:
- Around line 47-49: The linter image tag is invalid: update the linter key
value (currently "jetbrains/qodana-jvm-community:2026.1") in qodana.yaml to a
released tag (for example "jetbrains/qodana-jvm-community:2025.3-community" or
the latest available release) so the Docker image exists; ensure you replace the
exact string "jetbrains/qodana-jvm-community:2026.1" with a valid tag.

---

Nitpick comments:
In @.gitattributes:
- Around line 28-41: The .gitattributes currently lists common image and archive
binaries but misses Java build artifacts; update .gitattributes to include
Java-specific binary patterns such as *.class, *.jar, *.war, *.ear, *.nar and
the build output directory pattern like /target/** to ensure Java compilations
and packaged binaries are treated as binary (preventing line-ending
normalization and corruption). Locate the .gitattributes file and add those
patterns alongside the existing entries so Git will ignore line-ending
conversions for Java artifacts.
- Around line 4-5: Remove the unnecessary Python-specific entries from
.gitattributes by deleting the patterns like "*.py", "*.pyc", "uv.lock" and
"/.pytest_cache/" so the file only contains attributes relevant to this
Java/Gradle repo; keep or add Java/Gradle-specific settings if needed and ensure
.gitattributes reflects the project's actual languages and tooling.

In @.github/workflows/build.yml:
- Around line 26-31: Update the Gradle cache step "Cache Gradle packages" to use
actions/cache@v4 to match the SonarCloud cache and get latest improvements;
locate the step that currently has uses: actions/cache@v1 and change the version
tag to actions/cache@v4, keeping the existing with: keys (path, key,
restore-keys) intact so behavior is unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 701ae60c-c318-408a-9561-df2b641f50fb

📥 Commits

Reviewing files that changed from the base of the PR and between 4fd6e6a and 0eeba37.

📒 Files selected for processing (4)
  • .gitattributes
  • .github/workflows/build.yml
  • .github/workflows/qodana_code_quality.yml
  • qodana.yaml

Comment on lines +10 to +13
push:
branches:
- master
- chore/versoins-bump
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove feature branch from push triggers before merging.

The chore/versoins-bump branch trigger appears to be for testing this workflow during development. Remove it before merging to avoid running Qodana on a stale/deleted branch.

🧹 Suggested fix
   push:
     branches:
       - master
-      - chore/versoins-bump
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
push:
branches:
- master
- chore/versoins-bump
push:
branches:
- master
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/qodana_code_quality.yml around lines 10 - 13, The
workflow's push trigger currently lists a development branch
"chore/versoins-bump" under the push: branches: section; remove that branch name
from the branches array so only intended branches (e.g., "master") remain,
ensuring the push trigger does not run for the temporary feature/test
branch—update the branches list under the push key and commit the change.

Comment on lines +47 to +49
#Qodana supports other languages, for example, Python, JavaScript, TypeScript, Go, C#, PHP
#For all supported languages see https://www.jetbrains.com/help/qodana/linters.html
linter: jetbrains/qodana-jvm-community:2026.1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if the Qodana Docker image tag exists
curl -s "https://hub.docker.com/v2/repositories/jetbrains/qodana-jvm-community/tags/2026.1" | jq '.name // "Tag not found"'

Repository: rabestro/graph-pathfinding-algorithms

Length of output: 96


Update Qodana linter to an available version.

The image tag jetbrains/qodana-jvm-community:2026.1 does not exist on Docker Hub. Use a valid, released version (e.g., 2025.3-community or later current release) instead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@qodana.yaml` around lines 47 - 49, The linter image tag is invalid: update
the linter key value (currently "jetbrains/qodana-jvm-community:2026.1") in
qodana.yaml to a released tag (for example
"jetbrains/qodana-jvm-community:2025.3-community" or the latest available
release) so the Docker image exists; ensure you replace the exact string
"jetbrains/qodana-jvm-community:2026.1" with a valid tag.

@rabestro rabestro closed this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant