Skip to content

ZCodeScan ZAPP schema reports false-positive error for valid baselines property #623

Description

@yukinoba

Development environment used

  • Z Open Editor version: 6.6.0
  • Editor Platform: ✅ Visual Studio Code (Bob)
  • Editor Platform Version: 1.121.0 (Bob 2.0.1)
  • Operating System: Windows 10 Build 26200 (with WSL Ubuntu 24.04.4 LTS)
  • Java Version: Not installed / not applicable
  • Node.js version: 18.19.1
  • Related to RSE API? No
  • Logs attached: No

Problem Description

The built-in ZAPP schema bundled with Z Open Editor reports a schema validation
error for the baselines property inside a zcodescan profile, even though
this property is documented as valid in the official IBM documentation.

Steps to reproduce

  1. Open (or create) a zapp.yaml file at the workspace root.
  2. Define a zcodescan profile that includes a baselines entry, for example:
profiles:
  - name: zcodescan
    type: zcodescan
    settings:
      rules:
        - type: local
          locations:
            - "zcodescan/sam-rules.yaml"
      customRuleModels:
        - type: local
          locations:
            - "zcodescan/rules-domains.yaml"
      baselines:
        - type: local
          locations:
            - "zcodescan/baseline.json"
  1. Observe the red squiggly underline on the baselines key and the
    following diagnostic in the Problems panel:
[yaml-schema: ZCodeScan profile] Property baselines is not allowed. (513)

Observed behavior

The YAML schema validation (provided by the Red Hat YAML extension using the
ZAPP schema bundled inside Z Open Editor) marks baselines as an
unrecognised / disallowed property and produces error code 513.

Expected behavior

No validation error should be raised. The baselines property is explicitly
listed as a valid setting for a zcodescan ZAPP profile in the official
IBM documentation:

Code analysis with IBM ZCodeScan
https://www.ibm.com/docs/en/developer-for-zos/17.0.x?topic=eclipse-code-analysis-zcodescan

The full profile structure documented there includes:

profiles:
  - name: zcodescan
    type: zcodescan
    settings:
      rules: [...]
      customRuleModels: [...]
      customRuleJars: [...]
      baselines:          # ← documented as valid
        - type: local
          locations:
            - "zcodescan/baseline.json"

Root cause hypothesis

The ZAPP JSON schema bundled with Z Open Editor version 6.6.02 appears to be
missing the baselines property definition for the ZCodeScan profile
settings object. The schema needs to be updated to include baselines (with
the same type / locations sub-structure used by rules and
customRuleModels) so that it matches the documented feature set.

Additional context

  • The sample project zopeneditor-sample-wazi-demo ships a zcodescan/baseline.json
    file and references it via baselines in zapp.yaml, so this false-positive
    affects users of the official IBM sample repository out of the box.
  • rules and customRuleModels use an identical sub-structure and are
    accepted without error — only baselines triggers the warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions