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

r/aws_redshiftdata_statement: Fix Semgrep error: Config funcs should follow form testAcc<Resource>Config_<testDetail> #25133

Merged
merged 2 commits into from
Jun 1, 2022

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Jun 1, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates: #25104.

Fixes:

Findings:

  internal/service/redshiftdata/statement_test.go 
     test-config-funcs-correct-form
        Config funcs should follow form testAcc<Resource>Config_<testDetail>

         27┆ {
         28┆ 	Config: testAccStatementConfigBasic(rName),
         29┆ 	Check: resource.ComposeTestCheckFunc(
         30┆ 		testAccCheckStatementExists(resourceName, &v),
         31┆ 		resource.TestCheckResourceAttrPair(resourceName, "cluster_identifier", "aws_redshift_cluster.test", "cluster_identifier"),
         32┆ 		resource.TestCheckResourceAttr(resourceName, "sql", "CREATE GROUP group_name;"),
         33┆ 		resource.TestCheckResourceAttr(resourceName, "parameters.#", "0"),
         34┆ 	),
         35┆ },

Some files were skipped or only partially analyzed.
  Scan was limited to files tracked by git.
  Partially scanned: 1 files only partially analyzed due to a parsing or internal Semgrep error
  Scan skipped: 1593 files matching .semgrepignore patterns
  For a full list of skipped files, run semgrep with the --verbose flag.

Ran 107 rules on 39[53](https://github.com/hashicorp/terraform-provider-aws/runs/6696150989?check_suite_focus=true#step:4:54) files: 1 finding.

Output from acceptance testing:

% make semall
==> Running Semgrep checks locally (must have semgrep installed)...
Scanning 3953 files with 37 go rules.
  100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|3953/3953 tasks

Findings:

  internal/service/ec2/ebs_volume_test.go 
     use-acctest-provider-factories
        Use acctest.ProviderFactories, not acctest.Providers

        702┆ Providers:    acctest.Providers,

Some files were skipped or only partially analyzed.
  Scan was limited to files tracked by git.
  Scan skipped: 1593 files matching .semgrepignore patterns
  For a full list of skipped files, run semgrep with the --verbose flag.

Ran 37 rules on 3953 files: 1 finding.

A new version of Semgrep is available. See https://semgrep.dev/docs/upgrading
Scanning 3953 files with 107 go rules.
  100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|3953/3953 tasks

Some files were skipped or only partially analyzed.
  Scan was limited to files tracked by git.
  Scan skipped: 1593 files matching .semgrepignore patterns
  For a full list of skipped files, run semgrep with the --verbose flag.

Ran 107 rules on 3953 files: 0 findings.

A new version of Semgrep is available. See https://semgrep.dev/docs/upgrading
Scanning 891 files with 179 go rules.
  100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|891/891 tasks

Some files were skipped or only partially analyzed.
  Scan was limited to files tracked by git.
  Scan skipped: 1593 files matching .semgrepignore patterns
  For a full list of skipped files, run semgrep with the --verbose flag.

Ran 180 rules on 891 files: 0 findings.

A new version of Semgrep is available. See https://semgrep.dev/docs/upgrading
Scanning 883 files with 197 go rules.
  100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|883/883 tasks

Some files were skipped or only partially analyzed.
  Scan was limited to files tracked by git.
  Scan skipped: 1593 files matching .semgrepignore patterns
  For a full list of skipped files, run semgrep with the --verbose flag.

Ran 201 rules on 883 files: 0 findings.

A new version of Semgrep is available. See https://semgrep.dev/docs/upgrading
Scanning 1122 files with 198 go rules.
  100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████|1122/1122 tasks

Some files were skipped or only partially analyzed.
  Scan was limited to files tracked by git.
  Scan skipped: 1593 files matching .semgrepignore patterns
  For a full list of skipped files, run semgrep with the --verbose flag.

Ran 198 rules on 1122 files: 0 findings.

A new version of Semgrep is available. See https://semgrep.dev/docs/upgrading

@ewbankkit ewbankkit changed the title Fix Semgrep error: Config funcs should follow form testAcc<Resource>Config_<testDetail> r/aws_redshiftdata_statement: Fix Semgrep error: Config funcs should follow form testAcc<Resource>Config_<testDetail> Jun 1, 2022
@ewbankkit ewbankkit added linter Pertains to changes to or issues with the various linters. service/redshiftdata Issues and PRs that pertain to the redshiftdata service. labels Jun 1, 2022
@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. and removed linter Pertains to changes to or issues with the various linters. labels Jun 1, 2022
@github-actions github-actions bot added the service/ec2ebs Issues and PRs that pertain to the ec2ebs service. label Jun 1, 2022
@ewbankkit ewbankkit added the linter Pertains to changes to or issues with the various linters. label Jun 1, 2022
@ewbankkit ewbankkit merged commit 87eba8a into main Jun 1, 2022
@ewbankkit ewbankkit deleted the fix-aws_redshiftdata_statement-test-config-name branch June 1, 2022 20:01
@github-actions github-actions bot added this to the v4.17.0 milestone Jun 1, 2022
github-actions bot pushed a commit that referenced this pull request Jun 1, 2022
@github-actions
Copy link

github-actions bot commented Jun 3, 2022

This functionality has been released in v4.17.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Jul 4, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linter Pertains to changes to or issues with the various linters. service/ec2ebs Issues and PRs that pertain to the ec2ebs service. service/redshiftdata Issues and PRs that pertain to the redshiftdata service. size/XS Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant