Skip to content

Commit

Permalink
chore: removed 'no-actions-type-end' rule (#1826)
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryAnansky authored Dec 17, 2024
1 parent 05cb768 commit 4523355
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 215 deletions.
5 changes: 5 additions & 0 deletions .changeset/new-falcons-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@redocly/openapi-core": patch
---

Removed the `no-actions-type-end` Spot rule.
1 change: 0 additions & 1 deletion docs/guides/lint-arazzo.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ The rules available for linting Arazzo are:
- `step-onFailure-unique`: the `onFailure` actions of the `step` object must be unique.
- `requestBody-replacements-unique`: the `replacements` of the `requestBody` object must be unique.
- `no-criteria-xpath`: the `xpath` type criteria is not supported by Spot.
- `no-actions-type-end`: the `end` type action is not supported by Spot.
- `criteria-unique`: the criteria list must not contain duplicated assertions.

Add the rules to `redocly.yaml`, but for Arazzo specifications, the rules go in their own configuration section called `arazzoRules`.
Expand Down
1 change: 0 additions & 1 deletion docs/rules/spec-ruleset.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ All the rules are of severity `error`:
- `step-onFailure-unique`
- `requestBody-replacements-unique`
- `no-criteria-xpath`
- `no-actions-type-end`
- `criteria-unique`
55 changes: 0 additions & 55 deletions docs/rules/spot/no-actions-type-end.test.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ exports[`resolveConfig should ignore minimal from the root and read local file 1
"arazzo1Preprocessors": {},
"arazzo1Rules": {
"criteria-unique": "warn",
"no-actions-type-end": "warn",
"no-criteria-xpath": "warn",
"parameters-not-in-body": "warn",
"parameters-unique": "error",
Expand Down Expand Up @@ -234,7 +233,6 @@ exports[`resolveStyleguideConfig should resolve extends with local file config w
"arazzo1Preprocessors": {},
"arazzo1Rules": {
"criteria-unique": "warn",
"no-actions-type-end": "warn",
"no-criteria-xpath": "warn",
"parameters-not-in-body": "warn",
"parameters-unique": "error",
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/config/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ const all: PluginStyleguideConfig<'built-in'> = {
arazzo1Rules: {
'criteria-unique': 'error',
'no-criteria-xpath': 'error',
'no-actions-type-end': 'error',
'parameters-not-in-body': 'error',
'parameters-unique': 'error',
'requestBody-replacements-unique': 'error',
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/config/minimal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ const minimal: PluginStyleguideConfig<'built-in'> = {
arazzo1Rules: {
'criteria-unique': 'off',
'no-criteria-xpath': 'off',
'no-actions-type-end': 'off',
'parameters-not-in-body': 'off',
'parameters-unique': 'off',
'requestBody-replacements-unique': 'off',
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/config/recommended-strict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ const recommendedStrict: PluginStyleguideConfig<'built-in'> = {
arazzo1Rules: {
'criteria-unique': 'error',
'no-criteria-xpath': 'error',
'no-actions-type-end': 'error',
'parameters-not-in-body': 'error',
'parameters-unique': 'error',
'requestBody-replacements-unique': 'error',
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/config/recommended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ const recommended: PluginStyleguideConfig<'built-in'> = {
arazzo1Rules: {
'criteria-unique': 'warn',
'no-criteria-xpath': 'warn',
'no-actions-type-end': 'warn',
'parameters-not-in-body': 'warn',
'parameters-unique': 'error',
'requestBody-replacements-unique': 'warn',
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/config/spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const spec: PluginStyleguideConfig<'built-in'> = {
'step-onFailure-unique': 'error',
'requestBody-replacements-unique': 'error',
'no-criteria-xpath': 'error',
'no-actions-type-end': 'error',
'criteria-unique': 'error',
},
};
Expand Down
121 changes: 0 additions & 121 deletions packages/core/src/rules/arazzo/__tests__/no-actions-type-end.test.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/core/src/rules/arazzo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { StepOnSuccessUnique } from './step-onSuccess-unique';
import { StepOnFailureUnique } from './step-onFailure-unique';
import { RequestBodyReplacementsUnique } from './requestBody-replacements-unique';
import { NoCriteriaXpath } from '../spot/no-criteria-xpath';
import { NoActionsTypeEnd } from '../spot/no-actions-type-end';
import { CriteriaUnique } from './criteria-unique';

import type { Arazzo1Rule } from '../../visitors';
Expand All @@ -35,7 +34,6 @@ export const rules: Arazzo1RuleSet<'built-in'> = {
'step-onFailure-unique': StepOnFailureUnique,
'requestBody-replacements-unique': RequestBodyReplacementsUnique,
'no-criteria-xpath': NoCriteriaXpath,
'no-actions-type-end': NoActionsTypeEnd,
'criteria-unique': CriteriaUnique,
};

Expand Down
27 changes: 0 additions & 27 deletions packages/core/src/rules/spot/no-actions-type-end.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/src/types/redocly-yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ const builtInArazzo1Rules = [
'step-onFailure-unique',
'requestBody-replacements-unique',
'no-criteria-xpath',
'no-actions-type-end',
'criteria-unique',
] as const;

Expand Down

1 comment on commit 4523355

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 78.64% 5047/6418
🟡 Branches 67.27% 2053/3052
🟡 Functions 73.16% 834/1140
🟡 Lines 78.93% 4760/6031

Test suite run success

834 tests passing in 121 suites.

Report generated by 🧪jest coverage report action from 4523355

Please sign in to comment.