Skip to content

Fix new needs weak content not detected#214

Merged
MaximilianSoerenPollak merged 5 commits into
eclipse-score:mainfrom
Aymen-Soussi-01:fix-new-needs-weak-content-not-detected
Aug 18, 2025
Merged

Fix new needs weak content not detected#214
MaximilianSoerenPollak merged 5 commits into
eclipse-score:mainfrom
Aymen-Soussi-01:fix-new-needs-weak-content-not-detected

Conversation

@Aymen-Soussi-01
Copy link
Copy Markdown
Contributor

@Aymen-Soussi-01 Aymen-Soussi-01 commented Aug 18, 2025

  • In this PR, we corrected the week content not detected bug, which was in case we have a word like '''just,''' it will be skipped as we search only for '''just''' with no ''','''.
  • We handled the edge case where 'Just' with an initial capital letter was not recognized as a weak word in the previous implementation.
  • We fixed the remaining review comment from the last PR: Fix linting errors part 2 #211

close: #196

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 18, 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: dcb0dc48-3227-473f-871c-0f5b86fc33d7
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 (73 packages loaded, 9 targets configured)

Analyzing: target //src:license-check (100 packages loaded, 212 targets configured)

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

Analyzing: target //src:license-check (137 packages loaded, 3540 targets configured)

INFO: Analyzed target //src:license-check (137 packages loaded, 4488 targets configured).
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: 13.409s, Critical Path: 0.36s
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>
[main] INFO Querying Eclipse Foundation for license data for 84 items.

@Aymen-Soussi-01 Aymen-Soussi-01 self-assigned this Aug 18, 2025
Comment thread docs/requirements/requirements.rst Outdated

Docs-as-Code shall enforce that requirement descriptions do not contain the following weak words:
just, about, really, some, thing, absol-utely
just, about, really, some, thing, absolutely
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These ones should not create an error.
there fore these might need to be moved to a 'note' or somethign.
Otherwise we will always error here, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This will not make an error, it's just to correct the requirement spelling, that's all

Copy link
Copy Markdown
Contributor

@MaximilianSoerenPollak MaximilianSoerenPollak Aug 18, 2025

Choose a reason for hiding this comment

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

Try if this fixes it:

.. tool_req:: Enforces description wording rules
  :id: tool_req__docs_common_attr_desc_wording
  :tags: Common Attributes
  :implemented: YES
  :satisfies:
    PROCESS_gd_req__req_desc_weak,
  :parent_covered: YES

  Docs-as-Code shall enforce that requirement descriptions do not contain the weak words mentioned below
  

  This rule applies to:

  * all requirement types defined in :need:`tool_req__docs_req_types`, except process requirements.

  .. note::
    Weak words mentioned here to avoid warning. 
    => just, about, really, some, thing, absolutely

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed by adding "-" to every weak word and leave the old note: Artificial...

Comment on lines +50 to +57
CollectResult = tuple[
str, # structure_text
str, # link_text
dict[str, str], # proc_impl_interfaces
dict[str, list[str]], # proc_used_interfaces
dict[str, str], # impl_comp
list[str], # proc_modules
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This change is quiet random in this PR, has not much to do with the issue you're trying to solve.

Don't mix in random changes please (even if they are valid).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As requested from PR: #211, I did the required fixes for the remaining comments

It's the comment related to creating a type for the return value of the function, as it is complex

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ye, but that should not be in this PR. As it's not related with the fix / issue you are fixing here.

Comment thread src/extensions/score_metamodel/checks/attributes_format.py
This should really work


#EXPECT: contains a weak word:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this even work, is this not too vague?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Please resolve.

Comment thread src/extensions/score_metamodel/tests/test_check_options.py Outdated
target_id="tool_req__002",
id="tool_req__002",
type="tool_req",
some_required_option=["not_a_string", 123],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This doesn't work either no?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since we are converting the values inside the list to strings? No? Not sure though, please enlighten me here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I just changed to a simple case where the some_required_option takes a number as a value, and the test is passing. Please resolve.

Comment thread src/tests/test_consumer.py
@github-actions
Copy link
Copy Markdown

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

@Aymen-Soussi-01 Aymen-Soussi-01 force-pushed the fix-new-needs-weak-content-not-detected branch from 80f672c to be7154d Compare August 18, 2025 12:57
@MaximilianSoerenPollak MaximilianSoerenPollak merged commit 0d7f37b into eclipse-score:main Aug 18, 2025
7 of 8 checks passed
arnoox pushed a commit to arnoox/score-docs-as-code that referenced this pull request Feb 20, 2026
* Fix and simplify complexity for weak content check
* handle edge cases to remove matching between "something"  and  "thing"
* Correct PR eclipse-score#211 remaining comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Weak content is not detected?

2 participants