Skip to content

Conversation

@AlexanderLanin
Copy link
Member

📌 Description

Once again I got distracted from my actual goal...

The important part here is actually very unnoticeable: The regexes now consistently have a ^ as the first character. In future PRs that will be used to identify a regex from a non regex.

The more visible change here is that I removed prefix and id restrictions where they were obvious. That is, they are now set programmatically during parsing of the yaml. At the very beginning. Therefore the rest of the code is completely unaffected.

During review please pay close attention that these match:

  • implementation of default prefix and id
  • documentation of default prefix and id
  • defaults do match the removed settings

No new tests added, as this is fully covered by existing tests.

🚨 Impact Analysis

  • This change does not violate any tool requirements and is covered by existing tool requirements
  • This change does not violate any design decisions
  • Otherwise I have created a ticket for new tool qualification

✅ Checklist

  • Added/updated documentation for new or changed features
  • Added/updated tests to cover the changes
  • Followed project coding standards and guidelines

@github-actions
Copy link

github-actions bot commented Sep 16, 2025

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run //src:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: 6b83d007-db42-403f-b7a0-a56afcf3d440
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: src
Analyzing: target //src:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //src:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //src:license-check (71 packages loaded, 9 targets configured)

Analyzing: target //src:license-check (73 packages loaded, 9 targets configured)

Analyzing: target //src:license-check (123 packages loaded, 1073 targets configured)

Analyzing: target //src:license-check (129 packages loaded, 2435 targets configured)

INFO: Analyzed target //src:license-check (137 packages loaded, 4500 targets configured).
[1 / 1] no actions running
INFO: Found 1 target...
Target //src:license.check.license_check up-to-date:
  bazel-bin/src/license.check.license_check
  bazel-bin/src/license.check.license_check.jar
INFO: Elapsed time: 15.299s, Critical Path: 0.39s
INFO: 13 processes: 4 disk cache hit, 9 internal.
INFO: Build completed successfully, 13 total actions
INFO: Running command line: bazel-bin/src/license.check.license_check src/formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions
Copy link

The created documentation from the pull request is available at: docu-html

@AlexanderLanin AlexanderLanin marked this pull request as ready for review September 16, 2025 19:18
Copilot AI review requested due to automatic review settings September 16, 2025 19:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR simplifies metamodel configuration by automatically setting default prefix and id values when they are redundant, instead of requiring explicit definitions in the YAML file. The change also standardizes regex patterns to consistently start with ^ to enable future regex identification.

  • Removes redundant prefix and id specifications from metamodel.yaml where they follow the default pattern
  • Implements programmatic default setting in the YAML parser with prefix defaulting to {directive_name}__ and id defaulting to ^{prefix}[0-9a-z_]+$
  • Updates regex patterns to consistently start with ^ for future pattern identification

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/extensions/score_metamodel/yaml_parser.py Adds logic to set default prefix and id patterns programmatically
src/extensions/score_metamodel/tests/test_metamodel_load.py Updates test to verify default id pattern is applied
src/extensions/score_metamodel/tests/test_check_options.py Removes unused test method for invalid option value types
src/extensions/score_metamodel/metamodel.yaml Removes redundant prefix and id definitions, adds consistent ^ prefix to regex patterns
src/extensions/score_metamodel/checks/check_options.py Refactors validation logic to return boolean and improve error handling
docs/internals/extensions/metamodel.md Documents default behavior for prefix and id in need types
Comments suppressed due to low confidence (1)

src/extensions/score_metamodel/metamodel.yaml:1

  • This regex pattern is missing the ^ anchor at the beginning, making it inconsistent with the stated goal of having all regexes start with ^. Should be ^assertion__[0-9a-zA-Z_-]*$.
# *******************************************************************************

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@dcalavrezo-qorix dcalavrezo-qorix left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexanderLanin AlexanderLanin merged commit 50d77f8 into main Sep 17, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from Draft to Done in Infrastructure Sep 17, 2025
@AlexanderLanin AlexanderLanin deleted the meta2 branch September 17, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants