Skip to content

Conversation

@RomanHotsiy
Copy link
Member

@RomanHotsiy RomanHotsiy commented Nov 25, 2024

What/Why/How?

Severity of configurable rules could not be overridden without full rule copy:

base.yaml

rules:
  rule/abc:
    severity: error
    # ...

redocly.yaml

extends:
  - base.yaml
rules:
  rule/abc: warn

The above did not work.

Reference

Reported by a customer.

Related to https://github.com/Redocly/redocly/issues/12111

Testing

Covered with unit test.

Screenshots (optional)

Check yourself

  • Code changed? - Tested with redoc/reference-docs/workflows (internal)
  • All new/updated code is covered with tests
  • New package installed? - Tested in different environments (browser/node)

Security

  • Security impact of change has been considered
  • Code follows company security practices and guidelines

@RomanHotsiy RomanHotsiy requested review from a team as code owners November 25, 2024 06:35
@changeset-bot
Copy link

changeset-bot bot commented Nov 25, 2024

🦋 Changeset detected

Latest commit: ba53b37

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@redocly/openapi-core Patch
@redocly/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2024

Command Mean [ms] Min [ms] Max [ms] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 996.2 ± 20.4 966.3 1025.3 1.00 ± 0.03
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 992.0 ± 14.6 978.2 1019.4 1.00

@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 78.82% 5029/6380
🟡 Branches 67.19% 2050/3051
🟡 Functions 73.35% 831/1133
🟡 Lines 79.12% 4743/5995
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / utils.ts
97.73%
92.98% (-2.72% 🔻)
100% 97.67%

Test suite run success

814 tests passing in 121 suites.

Report generated by 🧪jest coverage report action from ba53b37

Copy link
Collaborator

@tatomyr tatomyr left a comment

Choose a reason for hiding this comment

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

Left a few comments.

if (!obj) return;
for (const k of Object.keys(obj)) {
if (!target.hasOwnProperty(k)) continue;
if (typeof target[k] === 'object' && target[k] !== null && typeof obj[k] === 'string') {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please use isPlainObject.

@RomanHotsiy RomanHotsiy requested a review from tatomyr November 25, 2024 11:07
Copy link
Collaborator

@tatomyr tatomyr left a comment

Choose a reason for hiding this comment

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

LGMT, thanks!

@RomanHotsiy RomanHotsiy merged commit 72c4c07 into main Nov 25, 2024
39 checks passed
@RomanHotsiy RomanHotsiy deleted the fix-merge-severity branch November 25, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants