Skip to content

Suppress existing PMD CompareObjectsWithEquals violations and enforce rule in quality gate#4446

Merged
shai-almog merged 1 commit intomasterfrom
codex/fix-pmd-compareobjectswithequals-errors-a5ng3y
Jan 19, 2026
Merged

Suppress existing PMD CompareObjectsWithEquals violations and enforce rule in quality gate#4446
shai-almog merged 1 commit intomasterfrom
codex/fix-pmd-compareobjectswithequals-errors-a5ng3y

Conversation

@shai-almog
Copy link
Collaborator

Motivation

  • Silence existing PMD CompareObjectsWithEquals findings where identity comparisons are intentional so CI isn't noisy while preserving existing semantics.
  • Make sure future PRs fail the quality gate for new CompareObjectsWithEquals violations by adding the rule to the enforced PMD list.
  • Remove the redundant UncommentedEmptyMethodBody PMD rule from the core unit-tests ruleset.

Description

  • Added inline suppressions (//NOPMD CompareObjectsWithEquals) at existing identity comparison sites across Codename One sources to explicitly document and silence intentional ==/!= usage without changing runtime behavior.
  • Marked the PMD rule CompareObjectsWithEquals as forbidden in the QA gating script by adding it to the forbidden_pmd_rules set in .github/scripts/generate-quality-report.py so the PR-quality report will fail on new violations.
  • Excluded the redundant PMD rule UncommentedEmptyMethodBody from maven/core-unittests/pmd.xml to avoid duplicate/irrelevant warnings.

Testing

  • No automated tests were executed as part of this change (no unit or CI run was requested); changes are limited to targeted inline suppressions and quality-report configuration updates.
  • The quality-report script was updated to treat CompareObjectsWithEquals as a forbidden PMD rule; this will cause CI to fail on future occurrences when the script runs in the PR pipeline.

Codex Task

@github-actions
Copy link

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Collaborator Author

shai-almog commented Jan 19, 2026

Compared 30 screenshots: 30 matched.

Native Android coverage

  • 📊 Line coverage: 24.83% (2661/10717 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.44% (12347/50528), branch 15.28% (714/4672), complexity 17.54% (744/4241), method 33.08% (602/1820), class 34.98% (106/303)
    • Lowest covered classes
      • com.codename1.impl.android.com.codename1.impl.android.AndroidContactsManager – 0.00% (0/400 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$Video – 0.00% (0/168 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.IntentIntegrator – 0.00% (0/139 lines covered)
      • com.codename1.impl.android.util.com.codename1.impl.android.util.Base64 – 0.00% (0/117 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$SocketImpl – 0.00% (0/77 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidTextureView – 0.00% (0/76 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidSurfaceView – 0.00% (0/73 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.LocalNotificationPublisher – 0.00% (0/65 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.FridaDetectionUtil – 0.00% (0/64 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.PushNotificationService – 0.00% (0/59 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 24.83% (2661/10717 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.44% (12347/50528), branch 15.28% (714/4672), complexity 17.54% (744/4241), method 33.08% (602/1820), class 34.98% (106/303)
    • Lowest covered classes
      • com.codename1.impl.android.com.codename1.impl.android.AndroidContactsManager – 0.00% (0/400 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$Video – 0.00% (0/168 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.IntentIntegrator – 0.00% (0/139 lines covered)
      • com.codename1.impl.android.util.com.codename1.impl.android.util.Base64 – 0.00% (0/117 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$SocketImpl – 0.00% (0/77 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidTextureView – 0.00% (0/76 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidSurfaceView – 0.00% (0/73 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.LocalNotificationPublisher – 0.00% (0/65 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.FridaDetectionUtil – 0.00% (0/64 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.PushNotificationService – 0.00% (0/59 lines covered)

@shai-almog
Copy link
Collaborator Author

shai-almog commented Jan 19, 2026

iOS screenshot updates

Compared 30 screenshots: 23 matched, 6 updated, 1 missing reference.

  • BrowserComponent — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    BrowserComponent
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as BrowserComponent.png in workflow artifacts.

  • graphics-draw-arc — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-arc
    Preview info: JPEG preview quality 20; JPEG preview quality 20; downscaled to 603x1311.
    Full-resolution PNG saved as graphics-draw-arc.png in workflow artifacts.

  • graphics-draw-gradient — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-gradient
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-gradient.png in workflow artifacts.

  • graphics-draw-round-rect — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-draw-round-rect.png.

    graphics-draw-round-rect
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-round-rect.png in workflow artifacts.

  • graphics-draw-string — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-string
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 422x918.
    Full-resolution PNG saved as graphics-draw-string.png in workflow artifacts.

  • graphics-draw-string-decorated — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-string-decorated
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 603x1311.
    Full-resolution PNG saved as graphics-draw-string-decorated.png in workflow artifacts.

  • kotlin — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    kotlin
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as kotlin.png in workflow artifacts.

Benchmark Results

  • VM Translation Time: 376 seconds
  • Compilation Time: 120 seconds

Detailed Performance Metrics

Metric Duration
Build Time Statistics
Setup & Unzip 35273 ms
Extract Extensions 20 ms
Google Services Setup 2 ms
Scan Classes 646 ms
Extract Libs 1087 ms
Inject Build Hints 52 ms
Generate Unit Tests 5 ms
Generate Stubs 1144 ms
Compile Stubs 2610 ms
Generate Icons 1176 ms
Prepare ParparVM 188 ms
ParparVM Execution 205267 ms
Post-VM Setup 339 ms
CocoaPods 5204 ms
Finalize 25 ms
Total Time 253039 msMaven Overhead : 123000 ms
CocoaPods Install (Script) 2000 ms
Simulator Boot (Run) 75000 ms
App Install 22000 ms
App Launch 9000 ms
Test Execution 180000 ms

@shai-almog shai-almog merged commit 165cd99 into master Jan 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant