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

feature request - change problem matcher variable to be relative to checkout-dir. #19

Closed
bnayah opened this issue Aug 1, 2021 · 1 comment

Comments

@bnayah
Copy link

bnayah commented Aug 1, 2021

I have a monorepo of terraform modules.

Basic structure is as follows:

git root/
.github/
.githuh/worksflows/*.yml
.github/matchers.json
aws/accounts/prod/us-east-1/
aws/modules/vpc
aws/organizations

Each 'account' folder is run by a separate github action, and has a separate state.

The issue is when using problem matchers.
The code assumes that the working directory is at the root of the checkout folder.

Since this is not the case in my flow, the matchers.json is not found.

Action should support variable 'working_directory' to enable module inspection.
Currently I Change directory to the target directory, however the matchers.json directory needs to be relative to the root of the checkout, not the current directory.

@bnayah bnayah changed the title FEATURE REQUEST - Support for 'working_directory' variable feature request - change problem matcher variable to be relative to checkout-dir. Aug 1, 2021
@bendrucker
Copy link
Member

The matcher file being added is this, you should not be supplying your own:

https://github.com/terraform-linters/setup-tflint/blob/master/.github/matchers.json

__dirname is the correct path, relative to the calling script. If you want to discuss further, we need an example of your workflow.

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

Successfully merging a pull request may close this issue.

2 participants