Skip to content

Use specific rules with the lint command #2665

Closed as not planned
Closed as not planned

Description

@musa-cf

Is your feature request related to a problem? Please describe.

We have very large OpenAPI specification files that generate thousands of rule violations. One barrier to addressing these issues is that OpenAPI specs are distributed in different repos, owned by different teams, etc., so it's in our best interest to automate as many of the fixes we can. We are phasing some rules into errors soon, and right now the output from the linter is very noisy, requiring some post-processing of the lint command output to filter down to the relevant rules.

Describe the solution you'd like

I'd love a flag that is functionally the opposite of --skip-rule. I have a large set of custom and inherited rules in our redocly config file, but for this lint invocation, I want to only lint for a specific rule, or a set of specific rules.

Describe alternatives you've considered

Right now, the best approach we've found is to use JSON output and filter via jq. It works okay, but we'd love to have the native support to save on running through the dozens of custom lint rules and generating larger JSON artifacts than necessary across all of workflows.

Activity

  1. tatomyr commented on Mar 17, 2026

    @tatomyr
    Collaborator

    @musa-cf have you considered using an alternate config (either via apis or in a separate config file)? I'm not exactly sure about your particular case, but could you try defining the rules you need in a file, say config.yaml, and then invoke the lint command using --config=config.yaml option? Seems like it should do the trick.

  2. tatomyr commented on Sep 7, 2026

    @tatomyr
    Collaborator

    Closing this as stale. Feel free to ping me or open a new issue if you still have the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions