threadheap / serverless-ide-vscode

Serverless IDE: Enhanced support for AWS SAM and CloudFormation in VS Code
https://serverless-ide.com/
195 stars 45 forks source link

support for ignore template files/paths #130

Open intptr-t opened 3 years ago

intptr-t commented 3 years ago

Please support cfn-lint's exclude(ignore) feature in Serverless IDE as well.


The Serverless IDE is checking template files more than necessary.

capture

Right now, I am developing with sam cli in a venv environment. In a venv environment with ServerlessIDE, if you install a library that generates templates for Cfn, it will target templates that you do not expect.

In that case, I would like to exclude the templates in the venv environment.

This does not occur when running from the command line cfn-lint.

https://github.com/intptr-t/serverless-ide-report-example-not-work-ignore

% cd serverless-ide-report-example-not-work-ignore
% pip install cfn-lint

% python -m venv venv
% source ./venv/bin/activate
% pip install aws-sam-cli
% code . template.yml
> cd serverless-ide-report-example-not-work-ignore
> pip install cfn-lint

> python -m venv venv
> .\venv\Scripts\activate
> pip install aws-sam-cli
> code . template.yml

Thanks.

pavelvlasov commented 3 years ago

thanks for reporting this @intptr-t! the extension will ignore files and folders in .gitignore would that option work for you?

intptr-t commented 3 years ago

Thanks for your reply @pavelvlasov. In my environment, even if I use .gitignore and ignore files and folders, they are still subject to cfn-lint.

picture

AXSJ commented 3 years ago

thanks for reporting this @intptr-t! the extension will ignore files and folders in .gitignore would that option work for you?

So, has this issue been fixed? For now, that will work. But it would be nice if you could choose the path to ignore.

drAlberT commented 2 years ago

A way to ignore a path would be great. I have a "legacy" folder with tons of files in the project and I'd like to disable linting on it to improve performances. Adding it to .gitignore is not a solution in this case.