From 33082a98ed28df85359315a6c90f3dccc3cff58f Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 25 Mar 2018 23:40:28 +0200 Subject: [PATCH] Documentation: Auto-DNS --- docs/configuration-files/env-file.rst | 2 +- docs/index.rst | 1 - docs/tutorials/adding-subdomains.rst | 4 +- docs/tutorials/enable-auto-dns.rst | 7 -- docs/tutorials/static-code-analysis.rst | 96 ++++++++++++++++++++ docs/tutorials/work-inside-the-container.rst | 2 +- 6 files changed, 100 insertions(+), 12 deletions(-) delete mode 100644 docs/tutorials/enable-auto-dns.rst create mode 100644 docs/tutorials/static-code-analysis.rst diff --git a/docs/configuration-files/env-file.rst b/docs/configuration-files/env-file.rst index 9d623d76..f0332535 100644 --- a/docs/configuration-files/env-file.rst +++ b/docs/configuration-files/env-file.rst @@ -912,7 +912,7 @@ to something else if ``53`` is already in use on your host operating system. on port ``53`` which would result in a failure when this BIND server is starting. You only need to set BIND to port ``53`` when you want to use the ``Auto-DNS`` feautre of the - Devilbox. When doing so, read this article with care: :ref:`tutorial_enable_auto_dns`. + Devilbox. When doing so, read this article with care: :ref:`global_configuration_auto_dns`. Container settings diff --git a/docs/index.rst b/docs/index.rst index 87132340..abb39f8d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -49,7 +49,6 @@ devilbox documentation tutorials/change-document-root tutorials/change-container-versions tutorials/work-inside-the-container - tutorials/enable-auto-dns tutorials/enable-xdebug tutorials/customize-vhost tutorials/custom-apache-modules diff --git a/docs/tutorials/adding-subdomains.rst b/docs/tutorials/adding-subdomains.rst index f777f6d2..08f9d39f 100644 --- a/docs/tutorials/adding-subdomains.rst +++ b/docs/tutorials/adding-subdomains.rst @@ -221,7 +221,7 @@ See here how to do that for Linux, MacOS or Windows: :ref:`getting_started_create_your_first_project_dns_entry` This however is not really convenient. If you have basically infinite sub domains (via catch-all), -you should consider using Auto-DNS instead: :ref:`tutorial_enable_auto_dns`. +you should consider using Auto-DNS instead: :ref:`global_configuration_auto_dns`. Step 2: Adjust apache22.yml """"""""""""""""""""""""""" @@ -395,7 +395,7 @@ See here how to do that for Linux, MacOS or Windows: :ref:`getting_started_create_your_first_project_dns_entry` This however is not really convenient. If you have basically infinite sub domains (via catch-all), -you should consider using Auto-DNS instead: :ref:`tutorial_enable_auto_dns`. +you should consider using Auto-DNS instead: :ref:`global_configuration_auto_dns`. Step 2: Adjust nginx.yml diff --git a/docs/tutorials/enable-auto-dns.rst b/docs/tutorials/enable-auto-dns.rst deleted file mode 100644 index 8cedfe25..00000000 --- a/docs/tutorials/enable-auto-dns.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. _tutorial_enable_auto_dns: - -*************** -Enable Auto-DNS -*************** - -Todo diff --git a/docs/tutorials/static-code-analysis.rst b/docs/tutorials/static-code-analysis.rst new file mode 100644 index 00000000..9eff563a --- /dev/null +++ b/docs/tutorials/static-code-analysis.rst @@ -0,0 +1,96 @@ +.. _tutorial_static_code_analysis: + +******************** +Static Code Analysis +******************** + +This tutorial gives you a general overview how to do static code analysis from within the PHP +container. + +.. seealso:: + * :ref:`available_tools` + * :ref:`tutorial_work_inside_the_php_container` + + +**Table of Contents** + +.. contents:: :local: + + +Awesome-ci +========== + +Awesome-ci is a collection of tools for analysing your +workspace and its files. You can for example check for: + +* git conflicts +* git ignored files that have not been removed from the git index +* trailing spaces and newlines +* non-utf8 files or utf8 files with bom +* windows line feeds +* null-byte characters +* empty files +* syntax errors for various languages +* inline css or js code +* customized regex + +Some of the bundled tools even allow for automatic fixing. + +.. seealso:: `awesome-ci `_ + +.. code-block:: bash + + # 1. Enter your PHP container + host> ./bash + + # 2. Go to your project folder + devilbox@php-7.0.20 $ cd /shared/httpd/my-project + + # 3. Run the tools + devilbox@php-7.0.20 $ git-conflicts --path=. + devilbox@php-7.0.20 $ git-ignored --path=. + devilbox@php-7.0.20 $ file-cr --path=. + devilbox@php-7.0.20 $ file-crlf --path=. + devilbox@php-7.0.20 $ file-empty --path=. + + # 4. Run tools with more options + devilbox@php-7.0.20 $ syntax-php --path=. --extension=php + devilbox@php-7.0.20 $ syntax-php --path=. --shebang=php + + +PHPCS +===== + +PHPCS is a code style analyser for PHP. + +.. seealso:: `PHPCS `_ + +.. code-block:: bash + + # 1. Enter your PHP container + host> ./bash + + # 2. Go to your project folder + devilbox@php-7.0.20 $ cd /shared/httpd/my-project + + # 3. Run it + devilbox@php-7.0.20 $ phpcs . + + +ESLint +====== + +ESLint is a Javascript static source code analyzer. + +.. seealso:: `ESLint `_ + +.. code-block:: bash + + # 1. Enter your PHP container + host> ./bash + + # 2. Go to your project folder + devilbox@php-7.0.20 $ cd /shared/httpd/my-project + + # 3. Run it + devilbox@php-7.0.20 $ eslint . diff --git a/docs/tutorials/work-inside-the-container.rst b/docs/tutorials/work-inside-the-container.rst index 70715993..cc894e24 100644 --- a/docs/tutorials/work-inside-the-container.rst +++ b/docs/tutorials/work-inside-the-container.rst @@ -270,7 +270,7 @@ The PHP container is hooked up by default to the bundled DNS server and makes us .. seealso:: You can achieve the same on your host operating system by explicitly enabling auto-dns. - See also: :ref:`global_configuration_auto_dns` and :ref:`tutorial_enable_auto_dns`. + See also: :ref:`global_configuration_auto_dns`. Checklist