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

How to exclude resource from linting but keep it in build stage? #409

Open
hasitparmar-snyk opened this issue Mar 4, 2025 · 0 comments
Open

Comments

@hasitparmar-snyk
Copy link

hasitparmar-snyk commented Mar 4, 2025

I have following folder structure for list of resources

.
└── src/
    ├── hidden/
    │   └── resources/
    │       ├── assignments/
    │       ├── lessons/
    │       ├── ai-bot/
    │       └── reports/
    └── rest/
        └── resources/
            ├── catalog/
            └── lessons/

And here is my .vervet.yaml configuration file:

linters:
  api-resource:
    description: Lint rules for individual API resource version specs
    optic-ci:
      script: node_modules/.bin/sweater-comb
apis:
  rest:
    resources:
      - path: 'src/rest/resources'
        linter: api-resource
        excludes:
            - 'src/rest/resources/stats/2024-08-29/spec.yaml'
            - 'src/rest/resources/education_resources/2024-05-13/spec.yaml'
            - 'src/rest/resources/assignments/2024-05-13/spec.yaml'

    overlays:
      - include: 'src/rest/overlays/openapi.yaml'
      - include: 'src/rest/overlays/security.yaml'
    output:
      paths:
        - 'dist/rest/versions'
        - 'src/rest/versions'
  hidden:
    resources:
      - path: 'src/hidden/resources'
        linter: api-resource
        excludes:
            - 'src/hidden/resources/ai-bot/2024-10-15/spec.yaml'

    overlays:
      - include: 'src/hidden/overlays/openapi.yaml'
      - include: 'src/hidden/overlays/security.yaml'
    output:
      paths:
        - 'dist/hidden/versions'
        - 'src/hidden/versions'

I want to exclude the hidden/ai-bot resource from sweater-comb linting but still include it in the vervet build process. Right now, I have added it to the excludes list, which makes it skip both linting and building.

Is there a way to disable sweater-comb linting for this resource while keeping it in the build process?

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

No branches or pull requests

1 participant