]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
tests: add a make target to check file permissions 441/head
authorVirtualTam <virtualtam@flibidi.net>
Sun, 17 Jan 2016 19:48:39 +0000 (20:48 +0100)
committerVirtualTam <virtualtam@flibidi.net>
Sun, 17 Jan 2016 20:02:24 +0000 (21:02 +0100)
Additions:
- [makefile] check versioned files are not executable
- [travis]   call the new make target

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
.travis.yml
Makefile
application/HttpUtils.php [changed mode: 0755->0644]
application/LinkUtils.php [changed mode: 0755->0644]
application/Url.php [changed mode: 0755->0644]
plugins/qrcode/qrcode.css [changed mode: 0755->0644]
tpl/tools.html [changed mode: 0755->0644]

index a3038c13d8c1e5505f67dab50b96662b751ad42a..7408b2e2dfd918abc4b085d22d1006c647ce1504 100644 (file)
@@ -11,4 +11,5 @@ install:
   - composer install
 script:
   - make clean
+  - make check_permissions
   - make test
index a86f9aa8bbe8bdb0b160db7cea331ba605a3eeb0..75c54f2875d012539e1ff3be563cabacdbf77041 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ BIN = vendor/bin
 PHP_SOURCE = index.php application tests plugins
 PHP_COMMA_SOURCE = index.php,application,tests,plugins
 
-all: static_analysis_summary test
+all: static_analysis_summary check_permissions test
 
 ##
 # Concise status of the project
@@ -98,6 +98,20 @@ mess_detector_summary: mess_title
                printf "$$warnings\t$$rule\n"; \
        done;
 
+##
+# Checks source file & script permissions
+##
+check_permissions:
+       @echo "----------------------"
+       @echo "Check file permissions"
+       @echo "----------------------"
+       @for file in `git ls-files`; do \
+               if [ -x $$file ]; then \
+                       errors=true; \
+                       echo "$${file} is executable"; \
+               fi \
+       done; [ -z $$errors ] || false
+
 ##
 # PHPUnit
 # Runs unitary and functional tests
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)