Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

several warnings during testing #545

Open
glasswalk3r opened this issue Aug 22, 2021 · 0 comments
Open

several warnings during testing #545

glasswalk3r opened this issue Aug 22, 2021 · 0 comments

Comments

@glasswalk3r
Copy link
Contributor

I've turned on the --warnings option of rspec during testing execution and caught a lot of warnings:

$ bundle exec rspec -w -f d spec/type/security_group_spec.rb 
awspec/.vendor/ruby/2.5.0/gems/ipaddress-0.8.3/lib/ipaddress.rb:72: warning: mismatched indentations at 'end' with 'unless' at 70
awspec/.vendor/ruby/2.5.0/gems/ipaddress-0.8.3/lib/ipaddress/prefix.rb:81: warning: mismatched indentations at 'end' with 'class' at 21
awspec/.vendor/ruby/2.5.0/gems/ipaddress-0.8.3/lib/ipaddress/ipv4.rb:647: warning: method redefined; discarding old multicast?
awspec/.vendor/ruby/2.5.0/gems/ipaddress-0.8.3/lib/ipaddress/ipv4.rb:633: warning: previous definition of multicast? was here
awspec/lib/awspec/helper/type.rb:36: warning: assigned but unused variable - name
awspec/lib/awspec/helper/finder/ec2.rb:20: warning: assigned but unused variable - e
awspec/lib/awspec/helper/finder/ec2.rb:51: warning: assigned but unused variable - res
awspec/lib/awspec/helper/finder/ec2.rb:218: warning: assigned but unused variable - res
awspec/lib/awspec/helper/finder/ecr.rb:10: warning: assigned but unused variable - res
awspec/lib/awspec/helper/finder/cloudtrail.rb:9: warning: assigned but unused variable - ret
awspec/lib/awspec/helper/finder/cloudtrail.rb:25: warning: assigned but unused variable - ret
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/dhcp_options.rb:237: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/dhcp_options.rb:280: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/image.rb:424: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/image.rb:467: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/instance.rb:760: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/instance.rb:803: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/internet_gateway.rb:237: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/internet_gateway.rb:280: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/network_acl.rb:300: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/network_acl.rb:343: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/nat_gateway.rb:311: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/nat_gateway.rb:354: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/network_interface.rb:397: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/network_interface.rb:440: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/route_table.rb:320: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/route_table.rb:363: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/security_group.rb:462: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/security_group.rb:505: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/snapshot.rb:441: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/snapshot.rb:484: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/subnet.rb:914: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/subnet.rb:957: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/volume.rb:376: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/volume.rb:419: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/vpc.rb:564: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/vpc.rb:607: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/customizations/resource.rb:8: warning: assigned but unused variable - resp
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/customizations/resource.rb:7: warning: method redefined; discarding old create_tags
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-ec2-1.254.0/lib/aws-sdk-ec2/resource.rb:1173: warning: previous definition of create_tags was here
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-s3-1.98.0/lib/aws-sdk-s3/encryption/io_decrypter.rb:14: warning: shadowing outer local variable - io
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-s3-1.98.0/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb:14: warning: shadowing outer local variable - io
awspec/.vendor/ruby/2.5.0/gems/aws-sdk-cloudfront-1.55.0/lib/aws-sdk-cloudfront/client_api.rb:502: warning: assigned but unused variable - listConflictingAliasesMaxItemsInteger
awspec/lib/awspec/type/resource_base.rb:14: warning: method redefined; discarding old id
awspec/lib/awspec/type/alb.rb:46: warning: method redefined; discarding old has_tag?
awspec/lib/awspec/type/base.rb:30: warning: previous definition of has_tag? was here
awspec/lib/awspec/type/ec2.rb:98: warning: assigned but unused variable - ret
awspec/lib/awspec/type/ec2.rb:106: warning: assigned but unused variable - ret
awspec/lib/awspec/type/ecs_container_instance.rb:18: warning: method redefined; discarding old cluster
awspec/lib/awspec/type/ecs_service.rb:17: warning: method redefined; discarding old cluster
awspec/lib/awspec/type/eks_nodegroup.rb:55: warning: method redefined; discarding old cluster
awspec/lib/awspec/type/emr.rb:38: warning: method redefined; discarding old bootstrapping?
awspec/lib/awspec/type/emr.rb:19: warning: previous definition of bootstrapping? was here
awspec/lib/awspec/type/launch_template.rb:28: warning: assigned but unused variable - res
awspec/lib/awspec/type/vpc.rb:53: warning: assigned but unused variable - res
awspec/lib/awspec/type/codedeploy_deployment_group.rb:18: warning: method redefined; discarding old application_name
awspec/lib/awspec/generator/spec/ec2.rb:17: warning: assigned but unused variable - instance_tag_name
awspec/lib/awspec/generator/spec/ec2.rb:18: warning: assigned but unused variable - subnet
awspec/lib/awspec/generator/spec/ec2.rb:19: warning: assigned but unused variable - eips
awspec/lib/awspec/generator/spec/ec2.rb:20: warning: assigned but unused variable - volumes
awspec/lib/awspec/generator/spec/ec2.rb:21: warning: assigned but unused variable - network_interfaces
awspec/lib/awspec/generator/spec/ec2.rb:22: warning: assigned but unused variable - credit_specification
awspec/lib/awspec/generator/spec/ec2.rb:23: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/ec2.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/rds.rb:15: warning: assigned but unused variable - instance_id
awspec/lib/awspec/generator/spec/rds.rb:16: warning: assigned but unused variable - sg_group_names
awspec/lib/awspec/generator/spec/rds.rb:21: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/rds.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/vpc.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/vpc.rb:13: warning: assigned but unused variable - route_tables
awspec/lib/awspec/generator/spec/vpc.rb:14: warning: assigned but unused variable - network_acls
awspec/lib/awspec/generator/spec/vpc.rb:15: warning: assigned but unused variable - vpc_attributes
awspec/lib/awspec/generator/spec/vpc.rb:16: warning: assigned but unused variable - spec
awspec/lib/awspec/generator/spec/security_group.rb:16: warning: assigned but unused variable - linespecs
awspec/lib/awspec/generator/spec/security_group.rb:17: warning: assigned but unused variable - inbound_rule_count
awspec/lib/awspec/generator/spec/security_group.rb:20: warning: assigned but unused variable - outbound_rule_count
awspec/lib/awspec/generator/spec/security_group.rb:23: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/security_group.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/security_group.rb:48: warning: assigned but unused variable - target
awspec/lib/awspec/generator/spec/security_group.rb:52: warning: assigned but unused variable - target
awspec/lib/awspec/generator/spec/security_group.rb:33: warning: assigned but unused variable - port
awspec/lib/awspec/generator/spec/security_group.rb:41: warning: assigned but unused variable - protocol
awspec/lib/awspec/generator/spec/route53_hosted_zone.rb:24: warning: assigned but unused variable - resource_record_sets
awspec/lib/awspec/generator/spec/route53_hosted_zone.rb:28: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/route53_hosted_zone.rb:32: warning: assigned but unused variable - name
awspec/lib/awspec/generator/spec/route53_hosted_zone.rb:41: warning: assigned but unused variable - v
awspec/lib/awspec/generator/spec/route53_hosted_zone.rb:42: warning: assigned but unused variable - type
awspec/lib/awspec/generator/spec/route53_hosted_zone.rb:45: warning: assigned but unused variable - dns_name
awspec/lib/awspec/generator/spec/route53_hosted_zone.rb:46: warning: assigned but unused variable - hosted_zone_id
awspec/lib/awspec/generator/spec/efs.rb:10: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/elb.rb:20: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/elb.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/elb.rb:9: warning: assigned but unused variable - health_check_options
awspec/lib/awspec/generator/spec/network_acl.rb:14: warning: assigned but unused variable - linespecs
awspec/lib/awspec/generator/spec/network_acl.rb:15: warning: assigned but unused variable - subnet_specs
awspec/lib/awspec/generator/spec/network_acl.rb:16: warning: assigned but unused variable - network_acl_id
awspec/lib/awspec/generator/spec/network_acl.rb:17: warning: assigned but unused variable - network_acl_tag_name
awspec/lib/awspec/generator/spec/network_acl.rb:18: warning: assigned but unused variable - inbound_entries_count
awspec/lib/awspec/generator/spec/network_acl.rb:21: warning: assigned but unused variable - outbound_entries_count
awspec/lib/awspec/generator/spec/network_acl.rb:24: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/network_acl.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/route_table.rb:14: warning: assigned but unused variable - linespecs
awspec/lib/awspec/generator/spec/route_table.rb:15: warning: assigned but unused variable - subnet_linespecs
awspec/lib/awspec/generator/spec/route_table.rb:16: warning: assigned but unused variable - route_table_id
awspec/lib/awspec/generator/spec/route_table.rb:17: warning: assigned but unused variable - route_table_tag_name
awspec/lib/awspec/generator/spec/route_table.rb:18: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/route_table.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/subnet.rb:15: warning: assigned but unused variable - subnet_id
awspec/lib/awspec/generator/spec/subnet.rb:16: warning: assigned but unused variable - subnet_tag_name
awspec/lib/awspec/generator/spec/subnet.rb:17: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/subnet.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/ebs.rb:9: warning: assigned but unused variable - attachment_specs
awspec/lib/awspec/generator/spec/ebs.rb:10: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/ebs.rb:18: warning: assigned but unused variable - instance
awspec/lib/awspec/generator/spec/s3_bucket.rb:59: warning: assigned but unused variable - transitions
awspec/lib/awspec/generator/spec/s3_bucket.rb:117: warning: assigned but unused variable - grant_specs
awspec/lib/awspec/generator/spec/s3_bucket.rb:118: warning: assigned but unused variable - tag
awspec/lib/awspec/generator/spec/s3_bucket.rb:120: warning: assigned but unused variable - bucket_policy
awspec/lib/awspec/generator/spec/s3_bucket.rb:122: warning: assigned but unused variable - lifecycle_specs
awspec/lib/awspec/generator/spec/s3_bucket.rb:123: warning: assigned but unused variable - location
awspec/lib/awspec/generator/spec/nat_gateway.rb:14: warning: assigned but unused variable - nat_gateway_id
awspec/lib/awspec/generator/spec/nat_gateway.rb:15: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/nat_gateway.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/network_interface.rb:14: warning: assigned but unused variable - instance_spec
awspec/lib/awspec/generator/spec/network_interface.rb:15: warning: assigned but unused variable - subnet_spec
awspec/lib/awspec/generator/spec/network_interface.rb:16: warning: assigned but unused variable - network_interface_id
awspec/lib/awspec/generator/spec/network_interface.rb:17: warning: assigned but unused variable - linespecs
awspec/lib/awspec/generator/spec/network_interface.rb:18: warning: assigned but unused variable - private_ip_addresses_count
awspec/lib/awspec/generator/spec/network_interface.rb:19: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/network_interface.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/iam_user.rb:9: warning: assigned but unused variable - inline_policies
awspec/lib/awspec/generator/spec/iam_user.rb:17: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/iam_group.rb:9: warning: assigned but unused variable - inline_policies
awspec/lib/awspec/generator/spec/iam_group.rb:17: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/iam_role.rb:9: warning: assigned but unused variable - inline_policies
awspec/lib/awspec/generator/spec/iam_role.rb:17: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/cloudwatch_logs.rb:9: warning: assigned but unused variable - log_stream_line
awspec/lib/awspec/generator/spec/cloudwatch_logs.rb:10: warning: assigned but unused variable - metric_filter_lines
awspec/lib/awspec/generator/spec/cloudwatch_logs.rb:11: warning: assigned but unused variable - subscription_filter_lines
awspec/lib/awspec/generator/spec/cloudwatch_logs.rb:12: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/alb.rb:16: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/alb.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/nlb.rb:16: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/nlb.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/internet_gateway.rb:14: warning: assigned but unused variable - internet_gateway_id
awspec/lib/awspec/generator/spec/internet_gateway.rb:15: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/internet_gateway.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/rds_db_parameter_group.rb:7: warning: assigned but unused variable - res
awspec/lib/awspec/generator/spec/rds_db_cluster_parameter_group.rb:7: warning: assigned but unused variable - res
awspec/lib/awspec/generator/spec/autoscaling_group.rb:17: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/autoscaling_group.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/alb_listener.rb:20: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/alb_listener.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/nlb_listener.rb:20: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/nlb_listener.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/redshift.rb:19: warning: assigned but unused variable - sg_group_names
awspec/lib/awspec/generator/spec/redshift.rb:24: warning: assigned but unused variable - content
awspec/lib/awspec/generator/spec/redshift.rb:6: warning: assigned but unused variable - describes
awspec/lib/awspec/generator/spec/redshift_cluster_parameter_group.rb:7: warning: assigned but unused variable - res
awspec/lib/awspec/generator/doc/type/base.rb:31: warning: assigned but unused variable - its
awspec/lib/awspec/generator/template.rb:124: warning: assigned but unused variable - content

Looks like a code cleanup is required. Also, maybe we should leave the warnings enabled by default during CI testing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant