Skip to content
Snippets Groups Projects

Add basepath parameter to PHP Code Sniffer

1 unresolved thread

Closes #3380694

Merge request reports

Merge request pipeline #412025 failed

Merge request pipeline failed for b30114f1

Closed by Fran Garcia-LinaresFran Garcia-Linares 4 months ago (Feb 20, 2025 11:04am UTC)

Merge details

  • The changes were not merged into 1.0.x.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Fran Garcia-Linares resolved all threads

    resolved all threads

  • 165 165 - when: on_success
    166 166 script:
    167 167 - test -f phpcs.xml.dist || curl -OL https://git.drupalcode.org/$_GITLAB_TEMPLATES_REPO/-/raw/$_GITLAB_TEMPLATES_REF/scripts/phpcs.xml.dist
    168 - vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source
    168 - vendor/bin/phpcs -s $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME --basepath=$_WEB_ROOT/modules/custom/$CI_PROJECT_NAME --report-junit=junit.xml --report-full --report-summary --report-source
    • The list of files should actually be links, and I don't see them in the screenshot you put in the issue.

      I think the suggestion here should fix it. If you can try, confirm, and then apply the suggestion we can RTBC.

      Suggested change
      316 - vendor/bin/phpcs -s $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME --basepath=$_WEB_ROOT/modules/custom/$CI_PROJECT_NAME --report-junit=junit.xml --report-full --report-summary --report-source
      316 - vendor/bin/phpcs -s $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME --basepath=$CI_PROJECT_DIR --report-junit=junit.xml --report-full --report-summary --report-source
    • This doesn't work, because the link should be in the filename column, but the phpcs's junit report put it in the name column.

    • Please register or sign in to reply
  • Jonathan Smith added 64 commits

    added 64 commits

    Compare with previous version

  • Adding --basepath is now covered in !325 (merged) so this MR can be closed.

    The question of how to populate the filename column can be investigated in a follow-up, as this MR is based on 1.0.x so would be more trouble than it is worth to re-purpose it.

  • Please register or sign in to reply
    Loading