serverless-ide-vscode icon indicating copy to clipboard operation
serverless-ide-vscode copied to clipboard

support for ignore template files/paths

Open intptr-t opened this issue 3 years ago • 4 comments

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

  • like https://github.com/aws-cloudformation/cfn-python-lint#config-file
  • like serverlessIDE.cfnLint.ignorePath

  • I'm submitting a ...

    • [ ] bug report
    • [x] feature request
    • [ ] support request => Please do not submit support request here, see note at the top of this template.
  • What is the current behavior?

The Serverless IDE is checking template files more than necessary.

capture

  • What is the expected behavior?

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.

  • Reproduction example project

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

  • macOS reproduction procedures
% 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
  • Windows reproduction procedures
> 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
  • My Environment
  • Extension Version: 0.5.30
  • macOS Environment:
    • Mac OS X / 10.15.7 / 19H524
    • VSCode version: 1.54.1 / f30a9b73e8ffc278e71575118b6bf568f04587c8 / x64
    • python --version: Python 3.9.1
  • Windows Environment:
    • OS Version: Microsoft Windows [Version 10.0.19043.844]
    • VSCode version: 1.54.2 / fd6f3bce6709b121a895d042d343d71f317d74e7 / x64
    • python --version: Python 3.9.1
    • code --list-extensions
    ThreadHeap.serverless-ide-vscode
    

Thanks.

intptr-t avatar Mar 13 '21 19:03 intptr-t

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

pavelvlasov avatar Apr 17 '21 05:04 pavelvlasov

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

intptr-t avatar Apr 17 '21 15:04 intptr-t

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.

AXSJ avatar Aug 10 '21 10:08 AXSJ

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.

drAlberT avatar Sep 23 '21 14:09 drAlberT