aws-cloudformation / cfn-lint

CloudFormation Linter
MIT No Attribution
2.45k stars 594 forks source link

Remote rules #1094

Closed KarthickEmis closed 4 years ago

KarthickEmis commented 5 years ago

I added my rules and it is in my local path, so in pre commit config.yaml file i added my local path to include the rules. Suppose If i have my own rules in my repo (github) , can we replace my local path to github path in the config.yaml file ?

kddejong commented 5 years ago

We don't have that capability builtin today but I really like this idea

mithun commented 4 years ago

IMO, updating cfn-lint to support remote rule locations will add bloat and complexity to this package. Implementing something like this will require appropriate handling of protocols, URIs, credentials, and caching.

Given that #1216 is merged, an acceptable alternative would be to package, distribute, and install custom rules via pip, which supports various git URIs. Then update your .pre-commit-config.yaml to use the rules (python) package name instead of a local path.

PatMyron commented 4 years ago

IMO, updating cfn-lint to support remote rule locations will add bloat and complexity to this package. Implementing something like this will require appropriate handling of protocols, URIs, credentials, and caching.

Agree with this. Leaning on the side of Unix philosophy where other tools solve fetching remote files better, especially if handling credentials, and I'd recommend retrieving remote files locally first and then referencing their local copies

similar issues: https://github.com/aws-cloudformation/cfn-python-lint/issues/1192, https://github.com/aws-cloudformation/cloudformation-guard/issues/24