Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add built-in recommeded-strict ruleset #1311

Merged
merged 3 commits into from
Oct 26, 2023

Conversation

tatomyr
Copy link
Contributor

@tatomyr tatomyr commented Oct 25, 2023

What/Why/How?

Adding new recommended-strict ruleset (the same as recommended, but with errors instead of warnings), so users rely on a maintained strict ruleset.

Also fixed a couple of discrepancies while updating tests/docs.

Reference

Closes #1290

Also related to:
#747
#976
#1277

Testing

Screenshots (optional)

Check yourself

  • Code is linted
  • Tested with redoc/reference-docs/workflows (internal)
  • All new/updated code is covered with tests

Security

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

@changeset-bot
Copy link

changeset-bot bot commented Oct 25, 2023

🦋 Changeset detected

Latest commit: 87fd36a

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 Minor
@redocly/cli Minor

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

@tatomyr tatomyr self-assigned this Oct 25, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 25, 2023

Command Mean [s] Min [s] Max [s] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 1.531 ± 0.049 1.472 1.608 1.00
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 1.562 ± 0.036 1.519 1.639 1.02 ± 0.04

@github-actions
Copy link
Contributor

github-actions bot commented Oct 25, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 76.12% 4054/5326
🟡 Branches 65.96% 2151/3261
🟡 Functions 68.26% 656/961
🟡 Lines 76.31% 3802/4982
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / recommended-strict.ts
100% 100% 100% 100%

Test suite run success

646 tests passing in 93 suites.

Report generated by 🧪jest coverage report action from 87fd36a

@tatomyr tatomyr marked this pull request as ready for review October 25, 2023 12:44
@tatomyr tatomyr requested a review from a team as a code owner October 25, 2023 12:44
@tatomyr tatomyr changed the title Feat/add recommended strict ruleset feat: add built-in recommeded-strict ruleset Oct 25, 2023
Copy link
Contributor

@lornajane lornajane left a comment

Choose a reason for hiding this comment

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

Thanks! The new ruleset seems to behave as I expected and the docs updates are good, thankyou! ⭐ ✏️

@tatomyr tatomyr force-pushed the feat/add-recommended-strict-ruleset branch from 1f9f5cd to 87fd36a Compare October 26, 2023 11:56
@IgorKarpiuk IgorKarpiuk merged commit 4620f79 into main Oct 26, 2023
28 checks passed
@IgorKarpiuk IgorKarpiuk deleted the feat/add-recommended-strict-ruleset branch October 26, 2023 12:07
jerryshao pushed a commit to apache/gravitino that referenced this pull request Feb 2, 2024
…1899)

### What changes were proposed in this pull request?

treat warnings as errors in lint OpenAPI

### Why are the changes needed?

Fix: #1893

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?
about `recommended-strict`, see
[here](Redocly/redocly-cli#1311)

before:

<img width="1417" alt="image"
src="https://github.com/datastrato/gravitino/assets/24897598/e610696b-76ff-4d80-8c25-a13d11fdde8c">

after:

<img width="1415" alt="image"
src="https://github.com/datastrato/gravitino/assets/24897598/b7f0aec8-70b6-48ab-9d3c-45dc74f52a9c">
github-actions bot pushed a commit to apache/gravitino that referenced this pull request Feb 2, 2024
…1899)

### What changes were proposed in this pull request?

treat warnings as errors in lint OpenAPI

### Why are the changes needed?

Fix: #1893

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?
about `recommended-strict`, see
[here](Redocly/redocly-cli#1311)

before:

<img width="1417" alt="image"
src="https://github.com/datastrato/gravitino/assets/24897598/e610696b-76ff-4d80-8c25-a13d11fdde8c">

after:

<img width="1415" alt="image"
src="https://github.com/datastrato/gravitino/assets/24897598/b7f0aec8-70b6-48ab-9d3c-45dc74f52a9c">
mchades added a commit to apache/gravitino that referenced this pull request Feb 2, 2024
…1905)

### What changes were proposed in this pull request?

treat warnings as errors in lint OpenAPI

### Why are the changes needed?

Fix: #1893

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?
about `recommended-strict`, see
[here](Redocly/redocly-cli#1311)

before:

<img width="1417" alt="image"
src="https://github.com/datastrato/gravitino/assets/24897598/e610696b-76ff-4d80-8c25-a13d11fdde8c">

after:

<img width="1415" alt="image"
src="https://github.com/datastrato/gravitino/assets/24897598/b7f0aec8-70b6-48ab-9d3c-45dc74f52a9c">

Co-authored-by: mchades <[email protected]>
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.

Make redocly lint exit with non-0 code if there are warnings
4 participants