Limit Linter to Specific Files or Patterns
See original GitHub issueCan 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:
- Created 4 years ago
- Reactions:5
- Comments:9 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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?
@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.