jenkins-bot has submitted this change and it was merged.
Change subject: Drop bin/run-phpcs-mw.sh
......................................................................
Drop bin/run-phpcs-mw.sh
All repositories have been migrated to use composer as an entry point.
Bug: T90943
Change-Id: I434e6ac2b083da302728f9e597773dc6aa2b9b85
---
D bin/run-phpcs-mw.sh
1 file changed, 0 insertions(+), 103 deletions(-)
Approvals:
Hashar: Looks good to me, approved
jenkins-bot: Verified
diff --git a/bin/run-phpcs-mw.sh b/bin/run-phpcs-mw.sh
deleted file mode 100755
index ed93aac..0000000
--- a/bin/run-phpcs-mw.sh
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/bash
-
-#
-# Wrapper to run PHP CodeSniffer with MediaWiki coding style
-#
-# Copyright 2013 Antoine "hashar" Musso
-# Copyright 2013 Wikimedia Foundation Inc.
-#
-#
-# Since phpcs is a bit long, we want to be able to run it only on files
-# modified in HEAD. Passing 'head' as an argument would enable that.
-#
-# In 'head' mode, if no files match the extensions in PHP_EXTS, the script will
-# abort early with exit code 0. That let us skip the job entirely.
-#
-# We also want to be able to ignore warnings while they are being fixed up. One
-# can pass 'nowarnings' as an argument to instruct phpcs to skip them and only
-# care about errors.
-#
-# Possibles calls are thus:
-#
-# Process all PHP files and whine on errors and warnings:
-#
-# run-phpcs-mw
-#
-# Process all PHP files but only whine on errors:
-#
-# run-phpcs-mw nowarnings
-#
-# Only care about files modified in HEAD:
-#
-# run-phpcs-mw head
-#
-# Same but only whining on errors:
-#
-# run-phpcs-mw head nowarnings
-#
-
-# Whether to use git-changed-in-head to restrict files phpcs will be run upon
-HEAD_ONLY=false
-
-# Whether to print warnings (false would invoke `phpcs -n`)
-WARNINGS=true
-
-# File extensions to look for.
-# In head mode, that is passed to git-changed-in-head
-# Else it is passed to phpcs --extensions
-PHP_EXTS=('php' 'php5' 'inc' 'sample')
-PHP_EXTS_WITH_SEP=$(IFS=,; echo "${PHP_EXTS[*]}")
-
-# Full path to phpcs
-#
-# It is deployed on Jenkins slaves from integration/phpcs.git using Wikimedia
-# deployment system.
-PHPCS="/srv/deployment/integration/phpcs/vendor/bin/phpcs"
-
-# Full path to MediaWiki CodeSniffer style
-#
-# It is deployed on Jenkins slaves from mediawiki/tools/codesniffer.git using
-# Wikimedia deployment system.
-PHPCS_STANDARD="/srv/deployment/integration/mediawiki-tools-codesniffer/MediaWiki"
-
-# Extra options to pass to phpcs
-PHPCS_OPTS=""
-
-# Filepatterns to ignore
-IGNORE=('languages/messages/Messages' '*.i18n.php' '*.i18n.alias.php')
-IGNORE_WITH_SEP=$(IFS=,; echo "${IGNORE[*]}")
-
-for arg in "$@"; do
- [[ "$arg" == "head" ]] && HEAD_ONLY=true
- [[ "$arg" == "HEAD" ]] && HEAD_ONLY=true
- [[ "$arg" == "nowarnings" ]] && WARNINGS=false
-done
-
-if $HEAD_ONLY; then
-
PHPCS_FILES=$(/srv/deployment/integration/slave-scripts/bin/git-changed-in-head
"${PHP_EXTS[@]}")
- if [[ -z "$PHPCS_FILES" ]]; then
- echo "Skipping phpcs run on HEAD: no file matching '$PHP_EXTS'"
- exit 0
- fi
- echo "Will only parse files changed in HEAD: $PHPCS_FILES"
-else
- # Fall back to current directory (should be Jenkins workspace)
- echo "Will parse $PHP_EXTS_WITH_SEP files in current directory."
- PHPCS_FILES='.'
- PHPCS_OPTS="$PHPCS_OPTS --extensions=$PHP_EXTS_WITH_SEP"
-fi
-
-if [[ $WARNINGS == false ]]; then
- echo "Will ignore warnings."
- PHPCS_OPTS="$PHPCS_OPTS -n"
-fi
-
-echo "Starting PHPCS..."
-set -ex
-$PHPCS -v -s $PHPCS_FILES \
- --encoding=utf-8 \
- --standard=$PHPCS_STANDARD \
- $PHPCS_OPTS \
- --ignore=$IGNORE_WITH_SEP \
- --report-checkstyle=checkstyle-phpcs.xml \
- --report-full
--
To view, visit https://gerrit.wikimedia.org/r/254400
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I434e6ac2b083da302728f9e597773dc6aa2b9b85
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits