reviewdog / action-tflint

Run tflint with reviewdog on pull requests to enforce best practices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for multiple plans per repository

nikolay opened this issue · comments

It's a common pattern to use multiple plans per repository, but acton-tflint does not support it. Any suggestion on how to work around the assumption?

Hm... I think that running multiple invocations of this action is the only way. Maybe some matrix of folders in which to run it + setting the working_directory?

I don't see how we could add support for multiple plans. Do you have any ideas?

@Vlaaaaaaad That means hardcoding it. For example, we have a repo with a growing number of plans in it - we can't keep hardcoding every single plan inside it. One PR may affect multiple plans, too. One way would be to have an option to run under each directory, which has a .tf file in it.

Hey @nikolay. Apologies, I am rather busy with some personal projects and I don't have any bandwidth to allocate for this right now 😞

My initial thoughts on this were that a matrix on the folders and setting working_directory would be a good workaround. The alternative would be to change the action to dynamically discover folders, but that is... more complex and tricky to do well.

@haya14busa any ideas on this?

@Vlaaaaaaad I think the lack of support of monorepos is more of a reviewdog oversight than specific action's.

Closing this as it's indeed a reviewdog design issue. I'd definitely go for the matrix + per-directory strategy. Maybe with another GitHub action that updates the directory list for the matrix, so you don't have to manually handle that.

Feel free to re-open if you have any other ideas!

@Vlaaaaaaad Thank you! I refactored my workflow to use a dynamic matrix.