Run multiple inspections with one Tuist invocation

I’d like to run implicit-imports and redundant-imports inspection with one call to tuist inspect. We’re running both in a pre-commit hook, so it would be great to have it run as quickly as possible.

Is there a way we can restructure the command to support that?

I’d suggest to do the following:

tuist inspect imports # would inspect both implicit and redundant imports
tuist inspect imports implicit
tuist inspect imports redundant

Thoughts @pepicrft @waltflanagan ?

We will need to keep the current tuist inspect implicit-imports and tuist inspect redundant-imports , so this is not a breaking change. But we can deprecate these two commands and remove them from the –help menu.

I’m onboard. I’d deprecate the others, and have an option to specify the ones that you want to run. For example:

tuist inspect imports --only implicit

Implemented in feat(cli): add unified inspect dependencies command by hiltonc · Pull Request #8887 · tuist/tuist · GitHub .

I called it tuist inspect dependencies because that seems more accurate (the imports aren’t implicit or redundant, that’s just what we use to determine whether the dependencies are implicit or redundant).

Happy to change naming or anything else.

1 Like