question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Limit Linter to Specific Files or Patterns

See original GitHub issue

Can a setting be added to use cfn-lint extension to lint specific GLOB patterns? I would like to set yaml.validate VS Code setting to enable for non-CloudFormation templates.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:5
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
coyoteecdcommented, Nov 11, 2019

It would be useful to exclude specific patterns as well. In my case, I use Serverless Framework to do deploys, and rely on this VSCode plugin + cfn-python-lint to do validation of the yml resources. This works reasonably well, except that the plugin tries to be smart and runs linting on the autogenerated .serverless/*.json files, which contains a json file that’s not a CloudFormation template but seems to be picked as such.

A simple way to ignore a path via e.g. plugin settings would be great for my use case. A better way is for the plugin to take into account the .cfnlintrc that I have defined in the workspace root, in the same way as the cfn-lint command does when I run it there. This also addresses the use case mentioned in the top comment.

Thoughts?

1reaction
dead-claudiacommented, Sep 6, 2022

@kddejong I normally use YAML exclusively for CFN configs anyways, so it wasn’t all that painful to just disable.

@PatMyron Nothing else shows up in my list of JSON formatters when I ran “Format document with…”, and it’s extremely unlikely this is being caused by any other extension.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Limit Linter to Specific Files or Patterns · Issue #68 - GitHub
A simple way to ignore a path via e.g. plugin settings would be great for my use case. A better way is for...
Read more >
Make ESLint apply rules to only certain file name patterns
Just make a "lint" script in your package.json and append any pattern you want: "lint": "npx eslint src/**/*.ts test/**/*.ts",.
Read more >
Linting Python in Visual Studio Code
Linting on file save, lintOnSave, true. Maximum number of linting messages, maxNumberOfProblems, 100. Exclude file and folder patterns, ignorePatterns ...
Read more >
Configuration Files - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
max-line-length - Rule
Config · limit - number greater than 0 defining the max line length · ignore-pattern - string defining ignore pattern for this rule,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found