Skip to content

Commit

Permalink
Generate infection.json (without .dist postfix), because it's a j…
Browse files Browse the repository at this point in the history
…son 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
  • Loading branch information
maks-rafalko committed Aug 11, 2021
1 parent 2a1a91a commit e70183a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Command/ConfigureCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/Configure/run_tests.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
4 changes: 2 additions & 2 deletions tests/e2e/Initial_Configuration/run_tests.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

0 comments on commit e70183a

Please sign in to comment.