From e70183a090e5b8f2cca7bbb208001827a49fae64 Mon Sep 17 00:00:00 2001 From: maks-rafalko Date: Wed, 11 Aug 2021 21:16:41 +0300 Subject: [PATCH 1/2] Generate `infection.json` (without `.dist` postfix), because it's a json file and **any** IDE automatically understands it. Currently, generated `.dist` file is not recognized as JSON file by PHPStorm, which makes it work like usual text file, where JSON autocompletion won't work --- src/Command/ConfigureCommand.php | 2 +- tests/e2e/Configure/run_tests.bash | 6 +++--- tests/e2e/Initial_Configuration/run_tests.bash | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Command/ConfigureCommand.php b/src/Command/ConfigureCommand.php index 25beeca9a..ddc09d050 100644 --- a/src/Command/ConfigureCommand.php +++ b/src/Command/ConfigureCommand.php @@ -216,7 +216,7 @@ private function saveConfig( ]; file_put_contents( - SchemaConfigurationLoader::DEFAULT_DIST_CONFIG_FILE, + SchemaConfigurationLoader::DEFAULT_CONFIG_FILE, json_encode($configObject, JSON_PRETTY_PRINT) ); } diff --git a/tests/e2e/Configure/run_tests.bash b/tests/e2e/Configure/run_tests.bash index 457c10b5e..31933029b 100755 --- a/tests/e2e/Configure/run_tests.bash +++ b/tests/e2e/Configure/run_tests.bash @@ -7,7 +7,7 @@ if test ! -f "$(which expect)"; then fi cd $(dirname $0) -rm -f infection.json.dist +rm -f infection.json set -e @@ -25,5 +25,5 @@ unset GITHUB_ACTIONS ./do_configure.expect -test -f infection.json.dist -diff -u infection.json.test infection.json.dist +test -f infection.json +diff -u infection.json.test infection.json diff --git a/tests/e2e/Initial_Configuration/run_tests.bash b/tests/e2e/Initial_Configuration/run_tests.bash index 3d0df4cdd..6ab23dcd3 100755 --- a/tests/e2e/Initial_Configuration/run_tests.bash +++ b/tests/e2e/Initial_Configuration/run_tests.bash @@ -7,7 +7,7 @@ if test ! -f "$(which expect)"; then fi cd $(dirname $0) -rm -v -f infection.json.dist infection.log +rm -v -f infection.json infection.log set -e @@ -27,4 +27,4 @@ unset GITHUB_ACTIONS trap 'echo Final check failed: $(tail -n+$LINENO $0 | head -n1)' ERR -test -f infection.json.dist +test -f infection.json From 3eff3fd2dbb38c92d169966a8b5ffad2494af34f Mon Sep 17 00:00:00 2001 From: maks-rafalko Date: Thu, 12 Aug 2021 01:19:11 +0300 Subject: [PATCH 2/2] Rename `infection.json.dist` to `infection.json` --- .gitignore | 1 - infection.json.dist => infection.json | 0 2 files changed, 1 deletion(-) rename infection.json.dist => infection.json (100%) diff --git a/.gitignore b/.gitignore index ae2e1db23..d0564c137 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ /build/ /devTools/Docker*.json /infection-cache -/infection.json /infection.log /phpunit.xml /tests/benchmark/*/coverage/ diff --git a/infection.json.dist b/infection.json similarity index 100% rename from infection.json.dist rename to infection.json