Skip to content

Commit

Permalink
Merge pull request #25952 from hashicorp/td-fix-new-nosemgreps
Browse files Browse the repository at this point in the history
Add "ci." to rule names in new `nosemgrep`s
  • Loading branch information
ewbankkit authored Jul 22, 2022
2 parents b6d33b0 + 79966e7 commit 6e42982
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions internal/service/ec2/vpc_security_group_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ func SecurityGroupRuleCreateID(securityGroupID, ruleType string, ip *ec2.IpPermi
return fmt.Sprintf("sgrule-%d", create.StringHashcode(buf.String()))
}

func expandIpPermission(d *schema.ResourceData, sg *ec2.SecurityGroup) *ec2.IpPermission { // nosemgrep:caps5-in-func-name
func expandIpPermission(d *schema.ResourceData, sg *ec2.SecurityGroup) *ec2.IpPermission { // nosemgrep:ci.caps5-in-func-name
apiObject := &ec2.IpPermission{
IpProtocol: aws.String(ProtocolForValue(d.Get("protocol").(string))),
}
Expand Down Expand Up @@ -782,7 +782,7 @@ func expandIpPermission(d *schema.ResourceData, sg *ec2.SecurityGroup) *ec2.IpPe
return apiObject
}

func flattenIpPermission(d *schema.ResourceData, apiObject *ec2.IpPermission, isVPC bool) { // nosemgrep:caps5-in-func-name
func flattenIpPermission(d *schema.ResourceData, apiObject *ec2.IpPermission, isVPC bool) { // nosemgrep:ci.caps5-in-func-name
if apiObject == nil {
return
}
Expand Down
8 changes: 4 additions & 4 deletions internal/service/ec2/vpc_security_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2409,7 +2409,7 @@ func testAccCheckSecurityGroupDestroy(s *terraform.State) error {
return nil
}

func testAccCheckSecurityGroupEC2ClassicDestroy(s *terraform.State) error { // nosemgrep:ec2-in-func-name
func testAccCheckSecurityGroupEC2ClassicDestroy(s *terraform.State) error { // nosemgrep:ci.ec2-in-func-name
conn := acctest.ProviderEC2Classic.Meta().(*conns.AWSClient).EC2Conn

for _, rs := range s.RootModule().Resources {
Expand Down Expand Up @@ -2458,7 +2458,7 @@ func testAccCheckSecurityGroupExists(n string, v *ec2.SecurityGroup) resource.Te
}
}

func testAccCheckSecurityGroupEC2ClassicExists(n string, v *ec2.SecurityGroup) resource.TestCheckFunc { // nosemgrep:ec2-in-func-name
func testAccCheckSecurityGroupEC2ClassicExists(n string, v *ec2.SecurityGroup) resource.TestCheckFunc { // nosemgrep:ci.ec2-in-func-name
return func(s *terraform.State) error {
rs, ok := s.RootModule().Resources[n]
if !ok {
Expand Down Expand Up @@ -2551,7 +2551,7 @@ resource "aws_security_group" "test" {
`, rName)
}

func testAccVPCSecurityGroupConfig_ec2Classic(rName string) string { // nosemgrep:ec2-in-func-name
func testAccVPCSecurityGroupConfig_ec2Classic(rName string) string { // nosemgrep:ci.ec2-in-func-name
return acctest.ConfigCompose(acctest.ConfigEC2ClassicRegionProvider(), fmt.Sprintf(`
resource "aws_security_group" "test" {
name = %[1]q
Expand Down Expand Up @@ -3482,7 +3482,7 @@ resource "aws_security_group" "test1" {
`, rName)
}

func testAccVPCSecurityGroupConfig_ingressWithCIDRAndSGsEC2Classic(rName string) string { // nosemgrep:ec2-in-func-name
func testAccVPCSecurityGroupConfig_ingressWithCIDRAndSGsEC2Classic(rName string) string { // nosemgrep:ci.ec2-in-func-name
return acctest.ConfigCompose(acctest.ConfigEC2ClassicRegionProvider(), fmt.Sprintf(`
resource "aws_security_group" "test2" {
name = "%[1]s-2"
Expand Down

0 comments on commit 6e42982

Please sign in to comment.