Skip to content

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

Merged
zdenekdrahos merged 3 commits intomasterfrom
phpmd-parsing-errors
May 14, 2021
Merged

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

Conversation

@zdenekdrahos
Copy link
Copy Markdown
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