Support `--recursive` flag
mitchellharvey97 opened this issue · comments
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