Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vimeo/psalm as new tool #87

Merged
merged 4 commits into from
Sep 22, 2017
Merged

Conversation

MacFJA
Copy link
Contributor

@MacFJA MacFJA commented Sep 14, 2017

Closes #85

Copy link
Member

@zdenekdrahos zdenekdrahos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • documentation
  • internalClass
  • composer.lock

@@ -0,0 +1,40 @@
<?xml version="1.0"?>
Copy link
Member

@zdenekdrahos zdenekdrahos Sep 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea to define XML template in twig!

composer.lock Outdated
@@ -4,8 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert changes in composer.lock.
I know that lock file is not up to date. I'll update before releasing a new version.

'psalm' => array(
'optionSeparator' => '=',
'xml' => ['psalm.xml'],
'errorsXPath' => '//item/severity[text()=\'error\']',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add internalClass. It prevents running a suggested tool when the tool is not installed.
phpqa should quietly ignore the tool, not show an error message:

# bad
$ ./phpqa --verbose --report --config tests/.travis --tools psalm
 [FileSystem\CleanDir] Cleaned build/
 [FileSystem\FilesystemStack] mkdir ["build\/"]
 [Edge\QA\Task\ParallelExec] "/phpqa-psalm/vendor/bin/psalm" --config="build/psalm-config.xml" --output-format=console --show-info=true --report="build//psalm.xml"
 1/1 [============================] 100%
 [Edge\QA\Task\ParallelExec] Output for  "/phpqa-psalm/vendor/bin/psalm" --config="build/psalm-config.xml" --output-format=console --show-info=true --report="build//psalm.xml" 

sh: 1: /phpqa-psalm/vendor/bin/psalm: not found

# good
$ ./phpqa --verbose --report --config tests/.travis --tools psalm
 [FileSystem\CleanDir] Cleaned build/
 [FileSystem\FilesystemStack] mkdir ["build\/"]
    0 [>---------------------------]
 [Edge\QA\Task\ParallelExec] 0 processes finished running
 [Edge\QA\Task\ParallelExec] Done in 0s

After that you can add psalm to bin/ci.sh (it will be tested in php 7.1)

)
);
$psalmConfigFile = escapePath($psalmConfigFile);
}
Copy link
Member

@zdenekdrahos zdenekdrahos Sep 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add documentation (#suggested tools (stable status), #output modes, #advanced configuration).
Please mention in psalm.config that analyzedDirs and ignoredDirs are not used when custom config is specified (you can copy-paste it from phpunit.config).

@MacFJA
Copy link
Contributor Author

MacFJA commented Sep 21, 2017

@zdenekdrahos Is it good or you need more?

@zdenekdrahos
Copy link
Member

Perfect!
Thanks, @MacFJA.

@zdenekdrahos zdenekdrahos merged commit 7b6fb71 into EdgedesignCZ:master Sep 22, 2017
@zdenekdrahos zdenekdrahos mentioned this pull request Sep 22, 2017
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants