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

phpmd - refine handling parsing errors (visual warning in html, enable counting them for exit code) #237

Merged
merged 3 commits into from
May 14, 2021

Conversation

zdenekdrahos
Copy link
Member

@zdenekdrahos zdenekdrahos commented May 14, 2021

  1. Find open phpmd issue for testing parsing errors, e.g.:
    <?php if (true): ?>
        <?php if (true): ?>
        <?php endif ?>
    <?php else: ?>
    <?php endif ?>
  2. Show visual warning in html report phpqa --config tests/.ci/ --tools phpmd -v
    Screen Shot 2021-05-14 at 11 13 18
  3. Edit phpmd.ignoreParsingErrors: true|false, check exit code (closes Exit code is ignored from phpmd (parsing errors for new php syntax) #230)
    $ nano tests/.ci/.phpqa.yml # phpmd.ignoreParsingErrors: true
    $ phpqa --config tests/.ci/ --tools phpmd:0
    $ echo $?
    0
    $ nano tests/.ci/.phpqa.yml # phpmd.ignoreParsingErrors: false
    $ phpqa --config tests/.ci/ --tools phpmd:0
    $ echo $?
    1

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.

Exit code is ignored from phpmd (parsing errors for new php syntax)
1 participant