From 7e076f92d4aa20b6a525b5fc0a65849eae6e0bb3 Mon Sep 17 00:00:00 2001 From: Daniel Mason Date: Wed, 11 Oct 2023 15:46:24 +0100 Subject: [PATCH] Add support for lint-staged (#8) --- src/Commands/UnusedCommand.php | 1 + tests/Commands/UnusedCommandTest.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Commands/UnusedCommand.php b/src/Commands/UnusedCommand.php index 829cfd8..0616fc6 100644 --- a/src/Commands/UnusedCommand.php +++ b/src/Commands/UnusedCommand.php @@ -12,6 +12,7 @@ class UnusedCommand extends Command { public $signature = 'translation:unused + {paths?* : This not used by this command but adds support for lint-staged. } {--b|generate-baseline : Generate a baseline file from the unused keys.}'; public $description = 'Finds unused language keys.'; diff --git a/tests/Commands/UnusedCommandTest.php b/tests/Commands/UnusedCommandTest.php index 4cbed77..a0f524b 100644 --- a/tests/Commands/UnusedCommandTest.php +++ b/tests/Commands/UnusedCommandTest.php @@ -23,7 +23,7 @@ config()->set('translation-linter.unused.filters', []); withoutMockingConsoleOutput(); - expect(artisan('translation:unused')) + expect(artisan('translation:unused "/this/argument/is/ignored" "/and/so/is/this"')) ->toBe(1) ->and(Artisan::output()) ->toMatchSnapshot();