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

Support --recursive flag #72

Closed
mitchellharvey97 opened this issue Jun 14, 2023 · 0 comments · Fixed by #73
Closed

Support --recursive flag #72

mitchellharvey97 opened this issue Jun 14, 2023 · 0 comments · Fixed by #73

Comments

@mitchellharvey97
Copy link
Contributor

Hey, I have come across a problem when passing the recursive flag into the action. I get the following error

  Failed to find workspaces; cannot use --recursive and --chdir at the same time

which makes sense as this line will always pass the chdir argument into the command. I am wondering if it is possible to add a flag to not send this if the user is specifying the recursive flag. I am thinking of possibly not setting tflint_target_dir to the default (as it shouldn't need to be passing in a . value anyway as it just indicates no changing of the directory) and only providing the command if there is a value provided.

I am happy to do the PR to get this change out, I am just seeking guidance on which way to approach this.

A sample of how we run this command is

      - name: Terraform Lint
        id: tflint
        uses: reviewdog/action-tflint@master
        with:
          github_token: ${{ secrets.github_token }}
          flags: "--enable-rule=terraform_unused_declarations --disable-rule=terraform_typed_variables --recursive"
          filter_mode: nofilter
          tflint_rulesets: "aws"
          level: "error
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

Successfully merging a pull request may close this issue.

1 participant