You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #14 Adding linting for the new add-lines configurator (weaverryan)
This PR was squashed before being merged into the main branch.
Discussion
----------
Adding linting for the new add-lines configurator
Supports symfony/flex#975
Commits
-------
89b84e9 Adding linting for the new add-lines configurator
if (!\in_array($addLine['position'], $validPositions, true)) {
161
+
$output->writeln(sprintf('::error file=%s::"add-lines" (index %d) must have a "position" key with one of the following values: "%s"', $manifest, $index, implode('", "', $validPositions)));
162
+
163
+
$isValid = false;
164
+
}
165
+
166
+
if ('after_target' === $addLine['position']) {
167
+
if (!isset($addLine['target'])) {
168
+
$output->writeln(sprintf('::error file=%s::"add-lines" (index %d) must have a "target" key when "position" is "after_target"', $manifest, $index));
169
+
170
+
$isValid = false;
171
+
} elseif (!is_string($addLine['target'])) {
172
+
$output->writeln(sprintf('::error file=%s::"add-lines" (index %d) has a "target" key but it must be a string value', $manifest, $index));
0 commit comments