aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2016-01-17 20:48:39 +0100
committerVirtualTam <virtualtam@flibidi.net>2016-01-17 21:02:24 +0100
commitfc17813bd1888aeace1e74a15c10ba79043a87f8 (patch)
tree0f4ef60c68f1226f1392cc5819c562958b2e54cb
parent122d90ef8d83c6702a8b47f81c32fa3ba7a53c31 (diff)
downloadShaarli-fc17813bd1888aeace1e74a15c10ba79043a87f8.tar.gz
Shaarli-fc17813bd1888aeace1e74a15c10ba79043a87f8.tar.zst
Shaarli-fc17813bd1888aeace1e74a15c10ba79043a87f8.zip
tests: add a make target to check file permissions
Additions: - [makefile] check versioned files are not executable - [travis] call the new make target Signed-off-by: VirtualTam <virtualtam@flibidi.net>
-rw-r--r--.travis.yml1
-rw-r--r--Makefile16
-rw-r--r--[-rwxr-xr-x]application/HttpUtils.php0
-rw-r--r--[-rwxr-xr-x]application/LinkUtils.php0
-rw-r--r--[-rwxr-xr-x]application/Url.php0
-rw-r--r--[-rwxr-xr-x]plugins/qrcode/qrcode.css0
-rw-r--r--[-rwxr-xr-x]tpl/tools.html0
7 files changed, 16 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index a3038c13..7408b2e2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,4 +11,5 @@ install:
11 - composer install 11 - composer install
12script: 12script:
13 - make clean 13 - make clean
14 - make check_permissions
14 - make test 15 - make test
diff --git a/Makefile b/Makefile
index a86f9aa8..75c54f28 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ BIN = vendor/bin
16PHP_SOURCE = index.php application tests plugins 16PHP_SOURCE = index.php application tests plugins
17PHP_COMMA_SOURCE = index.php,application,tests,plugins 17PHP_COMMA_SOURCE = index.php,application,tests,plugins
18 18
19all: static_analysis_summary test 19all: static_analysis_summary check_permissions test
20 20
21## 21##
22# Concise status of the project 22# Concise status of the project
@@ -99,6 +99,20 @@ mess_detector_summary: mess_title
99 done; 99 done;
100 100
101## 101##
102# Checks source file & script permissions
103##
104check_permissions:
105 @echo "----------------------"
106 @echo "Check file permissions"
107 @echo "----------------------"
108 @for file in `git ls-files`; do \
109 if [ -x $$file ]; then \
110 errors=true; \
111 echo "$${file} is executable"; \
112 fi \
113 done; [ -z $$errors ] || false
114
115##
102# PHPUnit 116# PHPUnit
103# Runs unitary and functional tests 117# Runs unitary and functional tests
104# Generates an HTML coverage report if Xdebug is enabled 118# Generates an HTML coverage report if Xdebug is enabled
diff --git a/application/HttpUtils.php b/application/HttpUtils.php
index e2c1cb47..e2c1cb47 100755..100644
--- a/application/HttpUtils.php
+++ b/application/HttpUtils.php
diff --git a/application/LinkUtils.php b/application/LinkUtils.php
index 26dd6b67..26dd6b67 100755..100644
--- a/application/LinkUtils.php
+++ b/application/LinkUtils.php
diff --git a/application/Url.php b/application/Url.php
index a4ac2e73..a4ac2e73 100755..100644
--- a/application/Url.php
+++ b/application/Url.php
diff --git a/plugins/qrcode/qrcode.css b/plugins/qrcode/qrcode.css
index 0d514a0e..0d514a0e 100755..100644
--- a/plugins/qrcode/qrcode.css
+++ b/plugins/qrcode/qrcode.css
diff --git a/tpl/tools.html b/tpl/tools.html
index c13f4f16..c13f4f16 100755..100644
--- a/tpl/tools.html
+++ b/tpl/tools.html