You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to make use of the modules inside this repository but on the surface I am concered by the code formatting and non standard validation of inputs.
This repo probably needs formatting, linting, document generation and validation applied to it. Then a bit of general code cleanup.
Potential IaC pipeline
Could make use something simple like pre-commit to format, lint, generate documentation and validation. You can run it client side or server side with pre-commit run --all-files.
Hello @taliesins
Very appreciate your valuable and very detailed feedback!
We are working these days on templates improvements and definitely implement your suggestions.
Thanks
@chkp-natanelm is this fixed in a branch or is this a case of this will not implemented? Hopefully quality of the code is considered important by your team.
Hi @taliesins,
Thank you for reaching out and for your concern regarding code quality.
I want to assure you that our team prioritizes code quality at the highest level.
We have established internal processes, not visible to the public, which integrating some of your suggestions and more, including internal tools to enhance our code quality, review, and testing procedures.
Thanks
We would like to make use of the modules inside this repository but on the surface I am concered by the code formatting and non standard validation of inputs.
This repo probably needs formatting, linting, document generation and validation applied to it. Then a bit of general code cleanup.
Potential IaC pipeline
Could make use something simple like pre-commit to format, lint, generate documentation and validation. You can run it client side or server side with
pre-commit run --all-files
.Example
.pre-commit-config.yaml
file:.tflint.hcl
.yamllint
Variable Validation
Variable validation has been part of Terraform since 0.13 - https://developer.hashicorp.com/terraform/language/values/variables#custom-validation-rules
There seems to be a lot of examples like the following:
We have regex validation occuring here: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/terraform/aws/autoscale-gwlb/locals.tf#L23
Which should probably be applied here: https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/terraform/aws/autoscale-gwlb/variables.tf#L89
Code formatting
These types of issues are throughout the code base.
Poor formatting
Random indentation:
https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/terraform/aws/cme-iam-role-gwlb/main.tf#L94
Should probably consistenly add spaces between resources
With space
https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/terraform/aws/autoscale-gwlb/main.tf#L134
With no space
https://github.com/CheckPointSW/CloudGuardIaaS/blob/master/terraform/aws/autoscale-gwlb/main.tf#L141
The text was updated successfully, but these errors were encountered: