X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=Makefile;h=b13d0561318c93296415622f0a2fbb2d03b25d58;hb=7be2a2d5f4078ba97b3281f2b5c33ae9bd337be5;hp=28740690754f86355f5022ce1d2593778d622049;hpb=37c9c6b4e62ba25f889ebb6486fe5c442acc9095;p=github%2Fshaarli%2FShaarli.git diff --git a/Makefile b/Makefile index 28740690..b13d0561 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,6 @@ # Makefile for PHP code analysis & testing, documentation and release generation BIN = vendor/bin -PHP_SOURCE = index.php application tests plugins all: static_analysis_summary check_permissions test @@ -23,23 +22,26 @@ docker_%: # - http://pear.php.net/manual/en/package.php.php-codesniffer.usage.php # - http://pear.php.net/manual/en/package.php.php-codesniffer.reporting.php ## -code_sniffer: code_sniffer_full +PHPCS := $(BIN)/phpcs + +code_sniffer: + @$(PHPCS) ### - errors filtered by coding standard: PEAR, PSR1, PSR2, Zend... PHPCS_%: - @$(BIN)/phpcs $(PHP_SOURCE) --report-full --report-width=200 --standard=$* + @$(PHPCS) --report-full --report-width=200 --standard=$* ### - errors by Git author code_sniffer_blame: - @$(BIN)/phpcs $(PHP_SOURCE) --report-gitblame + @$(PHPCS) --report-gitblame ### - all errors/warnings code_sniffer_full: - @$(BIN)/phpcs $(PHP_SOURCE) --report-full --report-width=200 + @$(PHPCS) --report-full --report-width=200 ### - errors grouped by kind code_sniffer_source: - @$(BIN)/phpcs $(PHP_SOURCE) --report-source || exit 0 + @$(PHPCS) --report-source || exit 0 ## # Checks source file & script permissions @@ -149,6 +151,10 @@ doxygen: clean @rm -rf doxygen @doxygen Doxyfile +### generate phpDocumentor documentation +phpdoc: clean + @docker run --rm -v $(PWD):/data -u `id -u`:`id -g` phpdoc/phpdoc + ### generate HTML documentation from Markdown pages with MkDocs htmldoc: python3 -m venv venv/