Compare commits

...
13 Commits
Author SHA1 Message Date
Gustavo Henrique Santos Souza de Miranda 48943160f1 Update Qodana workflow: add compile step and include generated sources for resolution
- Introduced a compile step (skipping tests) to prepare classes for import resolution.
- Adjusted `qodana.yaml` to include generated sources instead of excluding them, preventing unresolved imports.
2025-11-29 04:46:17 -03:00
Gustavo Henrique Santos Souza de Miranda 4d6e1cbb3a Disable Qodana bootstrap script to avoid shell parsing issues in CI 2025-11-29 04:36:33 -03:00
Gustavo Henrique Santos Souza de Miranda 652567aa8b Disable Qodana bootstrap script to avoid shell parsing issues in CI 2025-11-29 04:29:26 -03:00
Gustavo Henrique Santos Souza de Miranda f0b786d740 Refine Qodana bootstrap: simplify POSIX-safe chain and suppress command output 2025-11-29 04:26:10 -03:00
Gustavo Henrique Santos Souza de Miranda a55ff88e08 Refine Qodana config: simplify bootstrap logic and improve POSIX compatibility 2025-11-29 04:23:48 -03:00
Gustavo Henrique Santos Souza de Miranda f39c19fb5c Update Qodana config and workflow: simplify linter configuration
- Removed `args` step from workflow; linter is now fully defined in `qodana.yaml` as `qodana-jvm`.
- Switched to canonical linter name in `qodana.yaml` to avoid image warnings and CLI issues.
2025-11-29 04:19:48 -03:00
Gustavo Henrique Santos Souza de Miranda e729ffcd41 Refine Qodana config and workflow: improve bootstrap logic and pass linter image via args
- Updated bootstrap step to support POSIX `sh` compatibility and refine Maven fallback logic.
- Replaced deprecated `image` input with `args` to pass the linter image in the workflow.
2025-11-29 04:17:12 -03:00
Gustavo Henrique Santos Souza de Miranda c6111980f5 Update Qodana config and workflow: refine bootstrap step and specify linter image
- Enhanced bootstrap logic to handle both Maven Wrapper and system Maven, ensuring source generation compatibility.
- Explicitly set `jetbrains/qodana-jvm:2025.2` as the linter image in the workflow to suppress warnings.
2025-11-29 04:14:20 -03:00
Gustavo Henrique Santos Souza de Miranda 01364bdc16 Update Qodana config: add bootstrap step and exclude generated sources
- Added bootstrap command to generate sources for import resolution.
- Excluded generated sources from inspections to reduce noise.
2025-11-29 04:09:25 -03:00
Gustavo Henrique Santos Souza de Miranda 64d6f80267 Update Qodana workflow: add target_ref input for workflow_dispatch runs
- Introduced `target_ref` input to allow specifying a branch, tag, or commit SHA for analysis.
- Adjusted checkout logic to support `workflow_dispatch`, `push`, and `pull_request` events separately.
2025-11-29 03:59:36 -03:00
Gustavo Henrique Santos Souza de Miranda 78f8e08bb9 Improve Qodana workflow: adjust checkout logic and enable PR-specific reporting
- Use separate checkout steps for pull_request events and other event types
- Enable Qodana PR-specific reporting conditionally for pull_request events
2025-11-29 03:54:13 -03:00
Gustavo Henrique Miranda a0bf000edc Add master branch to workflow triggers 2025-11-29 03:51:09 -03:00
Gustavo Henrique Miranda 8e80b3c74e Add Contributor Code of Conduct document 2025-11-29 03:33:54 -03:00
3 changed files with 92 additions and 5 deletions
+74 -3
View File
@@ -1,9 +1,16 @@
name: Qodana name: Qodana
on: on:
workflow_dispatch: workflow_dispatch:
inputs:
target_ref:
description: 'Branch, tag, or commit SHA to analyze (default: develop)'
required: false
default: 'develop'
type: string
pull_request: pull_request:
push: push:
branches: # Specify your branches here branches: # Specify your branches here
- master
- main # The 'main' branch - main # The 'main' branch
- develop - develop
- 'releases/*' # The release branches - 'releases/*' # The release branches
@@ -16,14 +23,78 @@ jobs:
pull-requests: write pull-requests: write
checks: write checks: write
steps: steps:
- uses: actions/checkout@v3 # Checkout for pull_request events: use the PR head SHA for accurate analysis
- name: Checkout (pull_request)
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v4
with: with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0 # a full history is required for pull request analysis fetch-depth: 0 # a full history is required for pull request analysis
# Checkout for manual runs: use the selected branch/ref (default: develop)
- name: Checkout (workflow_dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v4
with:
ref: ${{ inputs.target_ref }}
fetch-depth: 0
# Checkout for push events (e.g., merges to develop): use the current commit
- name: Checkout (push)
if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v4
with:
fetch-depth: 0
# Set up JDK for potential code generation (e.g., protobuf) prior to Qodana analysis
- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
# Generate sources so that Qodana resolves imports from generated code
- name: Generate sources (protobuf)
shell: bash
run: |
if [ -f ./mvnw ]; then chmod +x ./mvnw || true; fi
if [ -x ./mvnw ]; then
./mvnw -B -DskipTests -DskipITs=true generate-sources || true
elif command -v mvn >/dev/null 2>&1; then
mvn -B -DskipTests -DskipITs=true generate-sources || true
else
echo "[Qodana prep] Maven not available; skipping generate-sources"
fi
# Optionally compile (skip tests) to ensure classes are available for resolution
- name: Compile (skip tests)
shell: bash
run: |
if [ -x ./mvnw ]; then
./mvnw -B -DskipTests -DskipITs=true compile || true
elif command -v mvn >/dev/null 2>&1; then
mvn -B -DskipTests -DskipITs=true compile || true
else
echo "[Qodana prep] Maven not available; skipping compile"
fi
# Helpful debug: list generated sources if present
- name: Show generated sources
shell: bash
run: |
echo "=== target/generated-sources (tree) ===" || true
if [ -d target/generated-sources ]; then
find target/generated-sources -maxdepth 3 -type d -print || true
else
echo "(none)" || true
fi
- name: 'Qodana Scan' - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2025.2 uses: JetBrains/qodana-action@v2025.2
with: with:
pr-mode: false # Enable PR-specific reporting only for pull_request events
pr-mode: ${{ github.event_name == 'pull_request' }}
# No extra args needed; linter is defined in qodana.yaml (qodana-jvm)
env: env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_268690425 }} QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_268690425 }}
QODANA_ENDPOINT: 'https://qodana.cloud' QODANA_ENDPOINT: 'https://qodana.cloud'
+5
View File
@@ -0,0 +1,5 @@
# Contributor Code of Conduct
This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters.
For more information please visit the [No Code of Conduct](https://nocodeofconduct.com) homepage.
+13 -2
View File
@@ -3,8 +3,19 @@
#################################################################################################################### ####################################################################################################################
version: "1.0" version: "1.0"
linter: jetbrains/qodana-jvm:2025.2 # Use canonical linter name to avoid image warnings and CLI flag issues
linter: qodana-jvm
profile: profile:
name: qodana.recommended name: qodana.recommended
bootstrap: |
# Disabled bootstrap to avoid shell parsing issues in CI. If you need code generation,
# we can re-enable a robust script later. For now, do nothing and let Qodana run.
:
include: include:
- name: CheckDependencyLicenses - name: CheckDependencyLicenses
exclude:
# Exclude generated sources from inspections to reduce noise
- name: All
paths:
- target/protoc-dependencies/**
# Keep generated sources included for indexing/resolution; excluding them can cause unresolved imports