aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2018-10-12 23:47:59 +0200
committerVirtualTam <virtualtam@flibidi.net>2018-12-02 22:39:16 +0100
commit37c9c6b4e62ba25f889ebb6486fe5c442acc9095 (patch)
tree2b9113c6ea1e66fbba348e501789e871ae7016eb /Makefile
parent5e0a898bb13fad528514b0d33763bcaae38b45b0 (diff)
downloadShaarli-37c9c6b4e62ba25f889ebb6486fe5c442acc9095.tar.gz
Shaarli-37c9c6b4e62ba25f889ebb6486fe5c442acc9095.tar.zst
Shaarli-37c9c6b4e62ba25f889ebb6486fe5c442acc9095.zip
lint: remove unused tools
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile56
1 files changed, 0 insertions, 56 deletions
diff --git a/Makefile b/Makefile
index 56cf09b2..28740690 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,6 @@
3 3
4BIN = vendor/bin 4BIN = vendor/bin
5PHP_SOURCE = index.php application tests plugins 5PHP_SOURCE = index.php application tests plugins
6PHP_COMMA_SOURCE = index.php,application,tests,plugins
7 6
8all: static_analysis_summary check_permissions test 7all: static_analysis_summary check_permissions test
9 8
@@ -18,21 +17,12 @@ docker_%:
18 cd ~/shaarli && make $* 17 cd ~/shaarli && make $*
19 18
20## 19##
21# Concise status of the project
22# These targets are non-blocking: || exit 0
23##
24
25static_analysis_summary: code_sniffer_source copy_paste mess_detector_summary
26 @echo
27
28##
29# PHP_CodeSniffer 20# PHP_CodeSniffer
30# Detects PHP syntax errors 21# Detects PHP syntax errors
31# Documentation (usage, output formatting): 22# Documentation (usage, output formatting):
32# - http://pear.php.net/manual/en/package.php.php-codesniffer.usage.php 23# - http://pear.php.net/manual/en/package.php.php-codesniffer.usage.php
33# - http://pear.php.net/manual/en/package.php.php-codesniffer.reporting.php 24# - http://pear.php.net/manual/en/package.php.php-codesniffer.reporting.php
34## 25##
35
36code_sniffer: code_sniffer_full 26code_sniffer: code_sniffer_full
37 27
38### - errors filtered by coding standard: PEAR, PSR1, PSR2, Zend... 28### - errors filtered by coding standard: PEAR, PSR1, PSR2, Zend...
@@ -52,52 +42,6 @@ code_sniffer_source:
52 @$(BIN)/phpcs $(PHP_SOURCE) --report-source || exit 0 42 @$(BIN)/phpcs $(PHP_SOURCE) --report-source || exit 0
53 43
54## 44##
55# PHP Copy/Paste Detector
56# Detects code redundancy
57# Documentation: https://github.com/sebastianbergmann/phpcpd
58##
59
60copy_paste:
61 @echo "-----------------------"
62 @echo "PHP COPY/PASTE DETECTOR"
63 @echo "-----------------------"
64 @$(BIN)/phpcpd $(PHP_SOURCE) || exit 0
65 @echo
66
67##
68# PHP Mess Detector
69# Detects PHP syntax errors, sorted by category
70# Rules documentation: http://phpmd.org/rules/index.html
71##
72MESS_DETECTOR_RULES = cleancode,codesize,controversial,design,naming,unusedcode
73
74mess_title:
75 @echo "-----------------"
76 @echo "PHP MESS DETECTOR"
77 @echo "-----------------"
78
79### - all warnings
80mess_detector: mess_title
81 @$(BIN)/phpmd $(PHP_COMMA_SOURCE) text $(MESS_DETECTOR_RULES) | sed 's_.*\/__'
82
83### - all warnings + HTML output contains links to PHPMD's documentation
84mess_detector_html:
85 @$(BIN)/phpmd $(PHP_COMMA_SOURCE) html $(MESS_DETECTOR_RULES) \
86 --reportfile phpmd.html || exit 0
87
88### - warnings grouped by message, sorted by descending frequency order
89mess_detector_grouped: mess_title
90 @$(BIN)/phpmd $(PHP_SOURCE) text $(MESS_DETECTOR_RULES) \
91 | cut -f 2 | sort | uniq -c | sort -nr
92
93### - summary: number of warnings by rule set
94mess_detector_summary: mess_title
95 @for rule in $$(echo $(MESS_DETECTOR_RULES) | tr ',' ' '); do \
96 warnings=$$($(BIN)/phpmd $(PHP_COMMA_SOURCE) text $$rule | wc -l); \
97 printf "$$warnings\t$$rule\n"; \
98 done;
99
100##
101# Checks source file & script permissions 45# Checks source file & script permissions
102## 46##
103check_permissions: 47check_permissions: