codecheck/slint: gathers checkers pages + improved 63/18863/6
Samuel GOUGEON [Wed, 11 Jan 2017 08:04:44 +0000 (09:04 +0100)]
 * all checkers pages merged.
   Improvements:
    - ToC added
    - table of codes added
    - Categories proposed and created
    - Descriptions: codes added. Descriptions improved
 * slint.xml improved:
   - clearer short desc
   - synopses exploded
   - Args: files: .sce case added
   - Description: case of scripts added. Case of error@compilation added.
   - Unitary example added, with sorted criteria tested
   - See also rewritten with new external pointers
   - History section added

  * Both PDF in ./help/.: just to see both new pages. Please remove PDF
    before merging.

Change-Id: Ic17ed01689e1eb8402cf14bc174d841fc4a34acd

42 files changed:
scilab/modules/slint/help/en_US/BracketedExp.xml [deleted file]
scilab/modules/slint/help/en_US/BreaksInLoop.xml [deleted file]
scilab/modules/slint/help/en_US/CommentRatio.xml [deleted file]
scilab/modules/slint/help/en_US/Decimal.xml [deleted file]
scilab/modules/slint/help/en_US/Deprecated.xml [deleted file]
scilab/modules/slint/help/en_US/EmptyBlock.xml [deleted file]
scilab/modules/slint/help/en_US/EqEq.xml [deleted file]
scilab/modules/slint/help/en_US/FunctionArgs.xml [deleted file]
scilab/modules/slint/help/en_US/FunctionArgsOrder.xml [deleted file]
scilab/modules/slint/help/en_US/FunctionName.xml [deleted file]
scilab/modules/slint/help/en_US/FunctionTestReturn.xml [deleted file]
scilab/modules/slint/help/en_US/GlobalKeyword.xml [deleted file]
scilab/modules/slint/help/en_US/IllegalCalls.xml [deleted file]
scilab/modules/slint/help/en_US/ImplicitList.xml [deleted file]
scilab/modules/slint/help/en_US/LineLength.xml [deleted file]
scilab/modules/slint/help/en_US/LinesCount.xml [deleted file]
scilab/modules/slint/help/en_US/LoadSave.xml [deleted file]
scilab/modules/slint/help/en_US/McCabe.xml [deleted file]
scilab/modules/slint/help/en_US/MopenMclose.xml [deleted file]
scilab/modules/slint/help/en_US/NaN.xml [deleted file]
scilab/modules/slint/help/en_US/NestedBlocks.xml [deleted file]
scilab/modules/slint/help/en_US/NotEqual.xml [deleted file]
scilab/modules/slint/help/en_US/NotNotChecker.xml [deleted file]
scilab/modules/slint/help/en_US/OldNot.xml [deleted file]
scilab/modules/slint/help/en_US/Printf.xml [deleted file]
scilab/modules/slint/help/en_US/Redefinition.xml [deleted file]
scilab/modules/slint/help/en_US/ReturnsCount.xml [deleted file]
scilab/modules/slint/help/en_US/Select.xml [deleted file]
scilab/modules/slint/help/en_US/SemicolonAtEOL.xml [deleted file]
scilab/modules/slint/help/en_US/SingleInstr.xml [deleted file]
scilab/modules/slint/help/en_US/SpacesInArgs.xml [deleted file]
scilab/modules/slint/help/en_US/StatInCond.xml [deleted file]
scilab/modules/slint/help/en_US/Struct.xml [deleted file]
scilab/modules/slint/help/en_US/TodoChecker.xml [deleted file]
scilab/modules/slint/help/en_US/UnreachableCode.xml [deleted file]
scilab/modules/slint/help/en_US/UselessArg.xml [deleted file]
scilab/modules/slint/help/en_US/UselessOp.xml [deleted file]
scilab/modules/slint/help/en_US/VariableName.xml [deleted file]
scilab/modules/slint/help/en_US/Variables.xml [deleted file]
scilab/modules/slint/help/en_US/codechecking_criteria.xml [new file with mode: 0644]
scilab/modules/slint/help/en_US/slint.xml
scilab/modules/slint/tests/unit_tests/files/slint_sample.sci [new file with mode: 0644]

diff --git a/scilab/modules/slint/help/en_US/BracketedExp.xml b/scilab/modules/slint/help/en_US/BracketedExp.xml
deleted file mode 100644 (file)
index 86016c6..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="BracketedExpChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for bracketed expressions</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check that expressions are bracketed: that increases the code readability.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/BreaksInLoop.xml b/scilab/modules/slint/help/en_US/BreaksInLoop.xml
deleted file mode 100644 (file)
index 9a5eb9e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="BreaksInLoopChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker to count break or coninue in loops</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check that numbers of break or continue in a loop are lesser than a maximum.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/CommentRatio.xml b/scilab/modules/slint/help/en_US/CommentRatio.xml
deleted file mode 100644 (file)
index d19687a..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="CommentRatioChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for comment ratio</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Compute and check the ratio between number of lines and number of comments.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/Decimal.xml b/scilab/modules/slint/help/en_US/Decimal.xml
deleted file mode 100644 (file)
index 814dfc9..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="DecimalChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for format of decimal numbers</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if a decimal number begins with a dot and if the decimal exponent is the correct character.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/Deprecated.xml b/scilab/modules/slint/help/en_US/Deprecated.xml
deleted file mode 100644 (file)
index 5bbfe27..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="DeprecatedChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for deprecated functions</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check for deprecated functions use.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/EmptyBlock.xml b/scilab/modules/slint/help/en_US/EmptyBlock.xml
deleted file mode 100644 (file)
index f00ff04..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="EmptyBlockChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for empty block</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if there are some empty blocks.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/EqEq.xml b/scilab/modules/slint/help/en_US/EqEq.xml
deleted file mode 100644 (file)
index f040739..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="EqEqChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for == as assignment</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if the equality operator is used in a single instruction.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[
-function y = foo(x)
-  y == x + 1; // probably a typo
-endfunction
-    ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/FunctionArgs.xml b/scilab/modules/slint/help/en_US/FunctionArgs.xml
deleted file mode 100644 (file)
index 3aab98d..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="FunctionArgsChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for function's arguments</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if a function's argument (in/out) have no duplicate.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[
-function y = foo(a, b, c, a) // probably an error
-   ...
-endfunction
-
-function [y, a] = foo(a, b, c) // not necessarily an error but could be one
-   ...
-endfunction
-    ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/FunctionArgsOrder.xml b/scilab/modules/slint/help/en_US/FunctionArgsOrder.xml
deleted file mode 100644 (file)
index 5962a08..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="FunctionArgsOrderChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for order in function arguments</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check that optional arguments are called at the right place.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[
-function foo(a, b, c)
-...
-endfunction
-
-function faa(x, y, z)
-   foo(x, b = 1, z) // not ok
-endfunction
-
-function fee(x, y, z)
-   foo(x, b = 1, c = 2) // ok
-endfunction
-
-function fii(x, y, z)
-   foo(x, c = 2, b = 1) // not ok
-endfunction
-    ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/FunctionName.xml b/scilab/modules/slint/help/en_US/FunctionName.xml
deleted file mode 100644 (file)
index 392cc5e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="FunctionNameChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for function name</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if a function's name matches a regex pattern.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/FunctionTestReturn.xml b/scilab/modules/slint/help/en_US/FunctionTestReturn.xml
deleted file mode 100644 (file)
index 4231cdb..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="FunctionTestReturnChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker error on function return</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check that the return of functions which have an error indicator are tested. The list of such functions is configurable.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[
-function foo(a, b, c)
-   [fd, err] = mopen(...) // ok err is returned
-   if err ... then // ok err is checked
-      ...
-   end
-   ...
-   mclose(fd);
-endfunction
-    ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/GlobalKeyword.xml b/scilab/modules/slint/help/en_US/GlobalKeyword.xml
deleted file mode 100644 (file)
index 89e33a4..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="GlobalKeywordChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for global keyword</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if the keyword <code>global</code> is present.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[
-function y = foo(x)
-    global z
-endfunction
-    ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/IllegalCalls.xml b/scilab/modules/slint/help/en_US/IllegalCalls.xml
deleted file mode 100644 (file)
index 69c0a7b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="IllegalCallsChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for illegal calls</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check that function calls are allowed: the list of illegal calls is configurable.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/ImplicitList.xml b/scilab/modules/slint/help/en_US/ImplicitList.xml
deleted file mode 100644 (file)
index f0cc55c..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="ImplicitListChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for implicitit list</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if an implicit list doesn't contain %nan or %inf and if one of the argument is not an implicit list itself.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/LineLength.xml b/scilab/modules/slint/help/en_US/LineLength.xml
deleted file mode 100644 (file)
index 8e6715c..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="LineLengthChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for line length</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check the line length.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/LinesCount.xml b/scilab/modules/slint/help/en_US/LinesCount.xml
deleted file mode 100644 (file)
index c8a9a9a..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="LinesCountChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for lines count</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check the lines count inside a function body. Have too much lines can decrease the readability.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/LoadSave.xml b/scilab/modules/slint/help/en_US/LoadSave.xml
deleted file mode 100644 (file)
index 7a93e80..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="LoadSaveChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for load/save functions</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check that load and save functions are used with variables name arguments.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/McCabe.xml b/scilab/modules/slint/help/en_US/McCabe.xml
deleted file mode 100644 (file)
index 5ec7a5c..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="McCabeChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for McCabe complexity</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Compute the simplified McCabe complexity and compare it to a reference.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/MopenMclose.xml b/scilab/modules/slint/help/en_US/MopenMclose.xml
deleted file mode 100644 (file)
index 6da6a85..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="MopenMcloseChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for mopen/mclose functions</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check when it's possible if the files opened with mopen are closed with mclose and check if <code>mclose("all")</code> is not used (because it could have some side-effects).
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/NaN.xml b/scilab/modules/slint/help/en_US/NaN.xml
deleted file mode 100644 (file)
index 5e7d5d3..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="NaNChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for NaN in comparisons</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Most of the time compare a number with NaN isn't a good idea. Use <code>isnan</code> is better.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/NestedBlocks.xml b/scilab/modules/slint/help/en_US/NestedBlocks.xml
deleted file mode 100644 (file)
index 00a8d97..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="NestedBlocksChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker to count the nested blocks</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check that numbers of nested blocks are lesser than a maximum.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/NotEqual.xml b/scilab/modules/slint/help/en_US/NotEqual.xml
deleted file mode 100644 (file)
index 147e68d..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="NotEqualChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for 'not equal' operator</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            The 'not equal' operator can be written '~=', '@=' or '&lt;&gt;', so check that only one is used.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/NotNotChecker.xml b/scilab/modules/slint/help/en_US/NotNotChecker.xml
deleted file mode 100644 (file)
index 4f90654..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="NotNotChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for double negation</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check that double negation are not used.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/OldNot.xml b/scilab/modules/slint/help/en_US/OldNot.xml
deleted file mode 100644 (file)
index ac65f0c..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="OldNotChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for old not operator</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check for use of not operator '@', '~' is preferable.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/Printf.xml b/scilab/modules/slint/help/en_US/Printf.xml
deleted file mode 100644 (file)
index 2ccbc16..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="PrintfChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for printf function</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check when it's possible if the number of %foo in printf first argument corresponds to the number of printf arguments.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/Redefinition.xml b/scilab/modules/slint/help/en_US/Redefinition.xml
deleted file mode 100644 (file)
index b01d7e5..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="RedefinitionChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for redefinition</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if a variable redefines a Scilab's constant, built-in or macro.
-        </para>
-        <para>
-            Redefine a Scilab's variable could have undesirable side-effects, so it should be avoided.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[
-function y = foo(x)
-    y = x
-endfunction
-
-function y = bar(x)
-    y = foo(x)
-endfunction
-
-function y = oof(x) // call oof(2) doesn't return 2 !
-    foo = rand(x, 1);
-    y = bar(x)
-endfunction
-    ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/ReturnsCount.xml b/scilab/modules/slint/help/en_US/ReturnsCount.xml
deleted file mode 100644 (file)
index 9aacc51..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="ReturnsCountChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker to count return in a function</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check that number of return in a function is lesser than a maximum.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/Select.xml b/scilab/modules/slint/help/en_US/Select.xml
deleted file mode 100644 (file)
index 579814c..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="SelectChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for select</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if select has a default case, if it has at least a case.
-        </para>
-        <para>
-            Check the homogeneity of the case expressions: all are constant scalar strings or constant scalar double.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/SemicolonAtEOL.xml b/scilab/modules/slint/help/en_US/SemicolonAtEOL.xml
deleted file mode 100644 (file)
index 37bda41..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="SemicolonAtEOLChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for semicolon at end of line</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check that lines are finished with a semicolon.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/SingleInstr.xml b/scilab/modules/slint/help/en_US/SingleInstr.xml
deleted file mode 100644 (file)
index a1f2f87..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="SingleInstrChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for single instruction</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if there is a single instruction on each line.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/SpacesInArgs.xml b/scilab/modules/slint/help/en_US/SpacesInArgs.xml
deleted file mode 100644 (file)
index d774b6b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="SpacesInArgsChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for spaces in arguments separated with commas</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check that there is a space after each comma in function arguments.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/StatInCond.xml b/scilab/modules/slint/help/en_US/StatInCond.xml
deleted file mode 100644 (file)
index aca40be..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="StatInCondChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker to count the statements in a condition (if or while condition)</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check that number of statements in a condition is lesser than a maximum.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/Struct.xml b/scilab/modules/slint/help/en_US/Struct.xml
deleted file mode 100644 (file)
index e27ba04..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="StructChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for struct</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check the struct definition (even number of arguments, field names are strings and match a regex pattern).
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/TodoChecker.xml b/scilab/modules/slint/help/en_US/TodoChecker.xml
deleted file mode 100644 (file)
index 28976f0..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="TodoChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for todo in comments</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if todo is present in comments. Most of the time, when there's a todo, it's probably that something must be finished.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/UnreachableCode.xml b/scilab/modules/slint/help/en_US/UnreachableCode.xml
deleted file mode 100644 (file)
index b843800..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="UnreachableCodeChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for unreachable code</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check for unreachable code (after a break or return). Unreachable code decreases code readability.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/UselessArg.xml b/scilab/modules/slint/help/en_US/UselessArg.xml
deleted file mode 100644 (file)
index d0c7547..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="UselessArgChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for function's arguments</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if a function's argument is useless or not. Useless arguments can decrease the readability.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/UselessOp.xml b/scilab/modules/slint/help/en_US/UselessOp.xml
deleted file mode 100644 (file)
index 37665f6..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="UselessOpChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for useless operations</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if an operation without assignment is used in a single instruction.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[
-function y = foo(x)
-  x + 1; // probably useless
-endfunction
-    ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/VariableName.xml b/scilab/modules/slint/help/en_US/VariableName.xml
deleted file mode 100644 (file)
index 3cf8d18..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="VariableNameChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for variable name</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if a variable's name matches a regex pattern.
-        </para>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/Variables.xml b/scilab/modules/slint/help/en_US/Variables.xml
deleted file mode 100644 (file)
index a0443b4..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
- *
- * This file must be used under the terms of the CeCILL.
- * This source file is licensed as described in the file COPYING, which
- * you should have received as part of this distribution.  The terms
- * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
- *
- -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="VariablesChecker" xml:lang="en">
-    <refnamediv>
-        <refname>Checker for variables use</refname>
-    </refnamediv>
-    <refsection>
-        <title>Description</title>
-        <para>
-            Check if a declared or uninitialized variable is used.
-        </para>
-        <para>
-            Initialized and unused variables are useless and can decrease the readability.
-        </para>
-        <para>
-            When an uninitialized variable is used its value is taken in the previous scope if defined so it could have side-effects.
-        </para>
-    </refsection>
-    <refsection>
-        <title>Examples</title>
-        <programlisting role="example"><![CDATA[
-function y = foo(x)
-    scilab = 123;
-    y = bar(x);
-endfunction
-
-function y = bar(x)
-    Scilab = 456;
-    y = scilab + 1; // typo error
-endfunction
-    ]]></programlisting>
-    </refsection>
-    <refsection role="see also">
-        <title>See also</title>
-        <simplelist type="inline">
-            <member>
-                <link linkend="slint">slint</link>
-            </member>
-        </simplelist>
-    </refsection>
-</refentry>
diff --git a/scilab/modules/slint/help/en_US/codechecking_criteria.xml b/scilab/modules/slint/help/en_US/codechecking_criteria.xml
new file mode 100644 (file)
index 0000000..c0bfc51
--- /dev/null
@@ -0,0 +1,758 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
+ * Copyright (C) 2017 - Samuel GOUGEON
+ *
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at
+ * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+        xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
+        xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
+        xmlns:scilab="http://www.scilab.org" xml:id="codechecking_criteria" xml:lang="en">
+    <refnamediv>
+        <refname>Scilab code-checking criteria</refname>
+    </refnamediv>
+    <refsection>
+        <title>Table of contents</title>
+        <simplelist>
+            <member>
+                <link linkend="slint_codetable">Table of checking id</link>
+            </member>
+            <member>
+                <link linkend="slint_function">function() and arguments</link>
+            </member>
+            <member>
+                <link linkend="slint_opsymbkey">Operators, symbols, keywords</link>
+            </member>
+            <member>
+                <link linkend="slint_codestyle">Code style</link>
+            </member>
+            <member>
+                <link linkend="slint_loops_blocks">Loops &amp; blocks</link>
+            </member>
+            <member>
+                <link linkend="slint_miscellaneous">Miscellaneous</link>
+            </member>
+        </simplelist>
+    </refsection>
+    <refsection role="description">
+        Checking codes and default parameters are defined in the <literal>SCI/modules/slint/etc/slint.xml</literal> file. In the same file, each criterium may be enabled (default) or disabled.
+        <!-- ==============================================================-->
+        <refsect2 id="slint_codetable">
+            <title>Checking id</title>
+            <table border="1">
+            <tr valign="top">
+                <td>
+                    <table>
+                        <tr valign="top">
+                            <td>00001</td>
+                            <td>global keyword</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00002</td>
+                            <td>Redefinition of reserved keywords</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00003</td>
+                            <td>Variable: valid name</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00003</td>
+                            <td>Variable: missing usage or missing local definition</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00004</td>
+                            <td>function: valid name</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00005</td>
+                            <td>Duplicate argins or/and duplicate argouts</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00006</td>
+                            <td>Unused input arguments</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00007</td>
+                            <td>Unassigned output argument</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00009</td>
+                            <td>One instruction per line</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00010</td>
+                            <td>Empty block</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00011</td>
+                            <td>mopen/mclose pairs &amp; mclose all</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00012</td>
+                            <td>McCabe complexity</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00013</td>
+                            <td>Format of literal decimal numbers</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00014</td>
+                            <td>printf: number of data matches the format</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00015</td>
+                            <td>Too long line</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00016</td>
+                            <td>function: max number of lines</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00017</td>
+                            <td>TODO exists</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00018</td>
+                            <td>NaN comparisons</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00019</td>
+                            <td>== instead of =</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00020</td>
+                            <td>Unassigned result. Useless operation</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00021</td>
+                            <td>unreachable code after return or break</td>
+                        </tr>
+                    </table>
+                </td>
+                <td> </td>
+                <td>
+                    <table>
+                        <tr valign="top">
+                            <td>00022</td>
+                            <td>Deprecated functions</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00023</td>
+                            <td>select without else</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00024</td>
+                            <td>Implicit list a:b without %nan nor %inf bounds</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00024</td>
+                            <td>Bad use of ':' operator</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00025</td>
+                            <td>struct: fields and data match</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00026</td>
+                            <td>save/load with variables names</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00027</td>
+                            <td>Deprecated @ (not) operator</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00028</td>
+                            <td>Binary operators between spaces</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00029</td>
+                            <td>Space after separating commas in argin list at function call</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00030</td>
+                            <td>Loop: max number of break or continue</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00031</td>
+                            <td>Nesting depth of blocks</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00032</td>
+                            <td>If or while tested conditions : max number of statements</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00033</td>
+                            <td>Bracketed expressions</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00034</td>
+                            <td>no NOT NOT</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00035</td>
+                            <td>function: illegal calls</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00036</td>
+                            <td>Comments: minimal required ratio wrt code</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00037</td>
+                            <td>order of named inputs</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00038</td>
+                            <td>Returned error flag must be tested</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00039</td>
+                            <td>Semicolon at end of line</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00040</td>
+                            <td>function: max number of return()</td>
+                        </tr>
+                        <tr valign="top">
+                            <td>00041</td>
+                            <td>NOT EQUAL consistency</td>
+                        </tr>
+                        <tr valign="top">
+                            <td></td>
+                            <td></td>
+                        </tr>
+                    </table>
+                </td>
+                </tr>
+            </table>
+            <para></para>
+        </refsect2>
+        <!-- ==============================================================-->
+        <refsect2 id="slint_function">
+            <title>function</title>
+            <variablelist>
+                <varlistentry>
+                    <term>valid name (00004)</term>
+                    <listitem>
+                        <para>
+                            Checks the name of functions:
+                            <itemizedlist>
+                                <listitem>option: names  may be tested against a given regexp pattern</listitem>
+                                <listitem>option: some minimal and maximal lengths of names may be defined.</listitem>
+                            </itemizedlist>
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Illegal calls (00035)</term>
+                    <listitem>
+                        <para>
+                            Checks that function calls are allowed: the list of concerned functions is configurable. Default = <code>pause, abort, quit, exit</code>
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>deprecated (00022)</term>
+                    <listitem>
+                        <para>
+                            Looks for calls to deprecated functions.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>number of lines (00016)</term>
+                    <listitem>
+                        <para>
+                            Checks the number of lines inside a function body. Too many lines can decrease the readability. Default max lines number = 200.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>number of return() (00040)</term>
+                    <listitem>
+                        <para>
+                            Checks that the number of calls to <code>return</code> in a function is less than a maximum. Default = only 1.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>arguments</term>
+                    <listitem>
+                        <variablelist>
+                            <varlistentry>
+                                <term>Unused input argument (00006)</term>
+                                <listitem>
+                                    <para>
+                                        Checks if a function's argument is useless or not. Useless arguments can decrease the readability.
+                                    </para>
+                                </listitem>
+                            </varlistentry>
+                            <varlistentry>
+                                <term>Unassigned output argument (00007)</term>
+                                <listitem>
+                                    <para>
+                                        Checks if output arguments are defined before returning.
+                                    </para>
+                                </listitem>
+                            </varlistentry>
+                            <varlistentry>
+                                <term>Space after separating commas (00029)</term>
+                                <listitem>
+                                    <para>
+                                        Checks that there is a space after each comma in the list of function arguments at call.
+                                    </para>
+                                </listitem>
+                            </varlistentry>
+                            <varlistentry>
+                                <term>Duplicate argins or/and duplicate argouts (00005)</term>
+                                <listitem>
+                                    <para>
+                                        Checks if a function's argument (in/out) have no duplicate.
+                                    </para>
+                                    <para>
+                                    <programlisting role="example"><![CDATA[
+                                    function y = foo(a, b, c, a) // probably an error
+                                        ...
+                                    endfunction
+
+                                    function [y, a] = foo(a, b, c) // not necessarily an error but could be one
+                                        ...
+                                    endfunction
+                                ]]></programlisting>
+                                    </para>
+                                </listitem>
+                            </varlistentry>
+                            <varlistentry>
+                                <term>Order of named inputs (00037)</term>
+                                <listitem>
+                                    <para>
+                                        Checks that named arguments are called at the right place.
+                                    </para>
+                                    <para>
+                                    <programlisting role="example"><![CDATA[
+                                    function foo(a, b, c)
+                                        ...
+                                    endfunction
+
+                                    function faa(x, y, z)
+                                        foo(x, b = 1, z) // not ok
+                                    endfunction
+
+                                    function fee(x, y, z)
+                                        foo(x, b = 1, c = 2) // ok
+                                    endfunction
+
+                                    function fii(x, y, z)
+                                        foo(x, c = 2, b = 1) // not ok
+                                    endfunction
+                             ]]></programlisting>
+                                    </para>
+                                </listitem>
+                            </varlistentry>
+                        </variablelist>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <para></para>
+        </refsect2>
+        <!-- ============================================================== -->
+        <refsect2 id="slint_opsymbkey">
+            <title>Operators, symbols, keywords</title>
+            <variablelist>
+                <varlistentry>
+                    <term>Bad use of ':' operator (00024)</term>
+                    <listitem>
+                        <para>
+                            Checks that in an implicit list a:b one or both bounds a or b is not another implicit list.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Deprecated @ (not) operator (00027)</term>
+                    <listitem>
+                        <para>
+                            Checks that the deprecated <literal>@ (not)</literal> operator is not used. <literal>~</literal> must now be used.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>no NOT NOT (00034)</term>
+                    <listitem>
+                        <para>
+                            Checks that no double negation is used. Such expressions shall be simplified.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>NOT EQUAL consistency (00041)</term>
+                    <listitem>
+                        <para>
+                            The 'not equal' operator can be written '~=', '@=' or '&lt;&gt;', so checks that only one is used.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>== instead of = (00019)</term>
+                    <listitem>
+                        <para>
+                            Checks if the equality operator is used in a single instruction.
+                        </para>
+                        <para>
+                            <programlisting role="example"><![CDATA[
+                            function y = foo(x)
+                                y == x + 1;     // probably a typo
+                            endfunction
+                        ]]></programlisting>
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>NaN comparisons (00018)</term>
+                    <listitem>
+                        <para>
+                            Most often, comparing a number with <constant>%nan</constant> isn't a good idea. Using <code>isnan</code> is better.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>global keyword (00001)</term>
+                    <listitem>
+                        <para>
+                            Checks if the keyword <code>global</code> is present.
+                        </para>
+                        <para>
+                            <programlisting role="example"><![CDATA[
+                            function y = foo(x)
+                                global z
+                            endfunction
+                        ]]></programlisting>
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Redefinition of reserved keywords (00002)</term>
+                    <listitem>
+                        <para>
+                            Checks if a variable redefines a Scilab's constant, built-in or macro.
+                        </para>
+                        <para>
+                            Redefining a Scilab's variable could have undesirable side-effects, so it should be avoided.
+                        </para>
+                        <para>
+                            <programlisting role="example"><![CDATA[
+                            function y = foo(x)
+                                y = x
+                            endfunction
+
+                            function y = bar(x)
+                                y = foo(x)
+                            endfunction
+
+                            function y = oof(x)    // call oof(2) doesn't return 2 !
+                                foo = rand(x, 1);
+                                y = bar(x)
+                            endfunction
+                         ]]></programlisting>
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>TODO (00017)</term>
+                    <listitem>
+                        <para>
+                            Checks if there are comments including the <literal>TODO</literal> mnemonic. Most often, TODO points to something that still must be achieved.
+                        </para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <para></para>
+        </refsect2>
+        <!-- ============================================================== -->
+        <refsect2 id="slint_codestyle">
+            <title>Code style</title>
+            <variablelist>
+                <varlistentry>
+                    <term>Too long line (00015)</term>
+                    <listitem>
+                    <para>
+                        Checks the line length. Scilab code style recommands a 80-char maximal length. This is the default value for slint.
+                    </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>One instruction per line (00009)</term>
+                    <listitem>
+                        <para>
+                            Checks if there is a single instruction on each line.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Semicolon at end of line (00039)</term>
+                    <listitem>
+                        <para>
+                            Checks that lines end with a semicolon.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Binary operators between spaces (00028)</term>
+                    <listitem>
+                        <para>
+                            Checks that each binary operator (<literal>+  -  *  /  >  >= &lt;  &lt;=  =  == ..</literal> is surrounded by spaces.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Format of literal decimal numbers (00013)</term>
+                    <listitem>
+                        <para>
+                            Checks if in a literal decimal number the correct exponent character is "e" or "E" (instead of "d" or "D"). In addition, checking that the decimal separator is a dot (instead of a comma) is also enabled by default.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Bracketed expressions (00033)</term>
+                    <listitem>
+                        <para>
+                            Checks that expressions are bracketed: that increases the code readability.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Comments: minimal required ratio wrt code (00036)</term>
+                    <listitem>
+                        <para>
+                            Computes and checks the ratio between number of lines and number of comments is greater than the minimum required. Default ratio = 30%.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>McCabe complexity (00012)</term>
+                    <listitem>
+                        <para>
+                            Computes the simplified <emphasis role="italic">McCabe</emphasis> complexity of the code, and compares it to a reference.
+                        </para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <para></para>
+        </refsect2>
+        <!-- ==============================================================-->
+        <refsect2 id="slint_loops_blocks">
+            <title>Loops and blocks</title>
+            <variablelist>
+                <varlistentry>
+                    <term>Empty block (00010)</term>
+                    <listitem>
+                        <para>
+                            Checks if there are some empty blocks.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>If or while tested conditions : max number of statements (00032)</term>
+                    <listitem>
+                        <para>
+                            Checks that the number of statements in the boolean condition is less than a maximum. Default = 5 max.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Nesting depth of blocks (00031)</term>
+                    <listitem>
+                        <para>
+                            Checks that the nesting depth of blocks is less than a maximum (default 3).
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>select (00023)</term>
+                    <listitem>
+                        <para>
+                            Checks <code>select</code> against various tests:
+                            <itemizedlist>
+                                <listitem>
+                                    A default <literal>else</literal> case is expected. Enabled by default.
+                                </listitem>
+                                <listitem>
+                                    When there is only one <literal>case</literal>, <literal>select</literal> shall be replaced with a simpler <literal>if</literal> statement. Warning enabled by default.
+                                </listitem>
+                                <listitem>
+                                    Empty <literal>case</literal> or <literal>else</literal> blocks are detected. Enabled by default.
+                                </listitem>
+                                <listitem>
+                                    The homogeneity of tested values is checked: all case values must have the same type. Disabled by default.
+                                </listitem>
+                            </itemizedlist>
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>unreachable code after return or break (00021)</term>
+                    <listitem>
+                        <para>
+                            Checks for unreachable code after a <function>break</function> or a <function>return</function> instruction. Unreachable code decreases code readability.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Loop: max number of break or continue (00030)</term>
+                    <listitem>
+                        <para>
+                            Check that numbers of <function>break</function> or <function>continue</function> in a loop are less than a maximum (default = only 1).
+                        </para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+            <para></para>
+        </refsect2>
+        <!-- ==============================================================-->
+        <refsect2 id="slint_miscellaneous">
+            <title>Miscellaneous</title>
+            <variablelist>
+                <varlistentry>
+                    <term>Implicit list a:b without %nan nor %inf bounds (00024)</term>
+                    <listitem>
+                        <para>
+                            Checks that an implicit list a:b is specified without any a or b bound set to %nan or %inf.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>printf: number of data matches the format (00014)</term>
+                    <listitem>
+                        <para>
+                            In calls to <function>printf()</function>, checks when it's possible whether the number of <literal>%</literal> formating directives matches the number of provided data. The data types matching is not tested.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>save/load with variables names (00026)</term>
+                    <listitem>
+                        <para>
+                            Checks that calls to <code>load()</code> and <code>save()</code> use the names of variables instead of variables handles.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>struct: fields and data match (00025)</term>
+                    <listitem>
+                        <para>
+                            Checks the <function>struct()</function> definition:
+                            <itemizedlist>
+                                <listitem>The numbers of fields names and values must match.</listitem>
+                                <listitem>option: field names may be tested against a given regexp pattern</listitem>
+                                <listitem>option: some minimal and maximal lengths of fields names may be defined.</listitem>
+                            </itemizedlist>; .
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>mopen/mclose pairs &amp; mclose all (00011)</term>
+                    <listitem>
+                        <para>
+                            Checks when it's possible if the files opened with <code>mopen()</code> are closed with <code>mclose()</code>. Checks as well if <code>mclose("all")</code> is not used: it may have some side-effects.
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Returned error flag must be tested (00038)</term>
+                    <listitem>
+                        <para>
+                            Checks that the error flag returned by some functions is actually retrieved and tested. The list of such functions is configurable.
+                        </para>
+                        <para>
+                            <programlisting role="example"><![CDATA[
+                            function foo(a, b, c)
+                               [fd, err] = mopen(...) // ok err is returned
+                               if err ... then // ok err is checked
+                                  ...
+                               end
+                               ...
+                               mclose(fd);
+                            endfunction
+                         ]]></programlisting>
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Unassigned result. Useless operation (00020)</term>
+                    <listitem>
+                        <para>
+                            Checks if an operation without assignment is used in a single instruction.
+                        </para>
+                        <para>
+                        <programlisting role="example"><![CDATA[
+                        function y = foo(x)
+                            x + 1;    // probably useless
+                        endfunction
+                    ]]></programlisting>
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>Variable: valid name (00003)</term>
+                    <listitem>
+                        <para>
+                            Checks if a variable's name matches a regex pattern.
+                            [some names yield an error and stop code-checking, like
+                            "3wrongName"]
+                        </para>
+                    </listitem>
+                </varlistentry>
+                <varlistentry>
+                    <term>
+                        Variable: missing usage or missing local definition (00003)
+                    </term>
+                    <listitem>
+                        <para>
+                            Looks for variables that are locally defined but unused.
+                            Such variables are useless and can decrease the code readability.
+                        </para>
+                        <para>
+                            Looks for variables used without being locally defined.
+                            Values of such variables are silently heritated from the calling level. This may have side effects.
+                        </para>
+                        <para>
+                        <programlisting role="example"><![CDATA[
+                        function y = foo(x)
+                            scilab = 123;
+                            y = bar(x);
+                        endfunction
+
+                        function y = bar(x)
+                            Scilab = 456;
+                            y = scilab + 1; // typo error
+                        endfunction
+                     ]]></programlisting>
+                        </para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+        </refsect2>
+    </refsection>
+    <refsection role="see also">
+        <title>See also</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="slint">slint</link>
+            </member>
+            <member>
+                <link linkend="debug">debug</link>
+            </member>
+            <member>
+                <link linkend="covStart">coverage</link>
+            </member>
+            <member>
+                <link linkend="test_run">test_run</link>
+            </member>
+        </simplelist>
+    </refsection>
+</refentry>
index 2c284c9..40090ed 100644 (file)
@@ -2,6 +2,7 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2015 - Scilab Enterprises - Calixte DENIZET
+ * Copyright (C) 2017 - Samuel GOUGEON
  *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="slint" xml:lang="en">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+    xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
+    xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
+    xmlns:scilab="http://www.scilab.org" xml:id="slint" xml:lang="en">
     <refnamediv>
         <refname>slint</refname>
-        <refpurpose>Call the lint tool</refpurpose>
+        <refpurpose>Checks the Scilab code of given macros against a set of criteria</refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Calling Sequence</title>
         <synopsis>
-            slint(files [, conf, out])
-            slint(files [, out])
-            out = slint(files [, conf], print)
+            slint(files)
+            slint(files, out)
+            slint(files, conf, resFilename)
+            out = slint(files, conf, print)
+            out = slint(files, print)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
             <varlistentry>
                 <term>files</term>
                 <listitem>
-                    <para>a matrix of strings, the .sci files or the directories to analyze.</para>
+                    matrix of strings: the <literal>.sci</literal> files or the directories to analyze. <literal>.sce</literal> or other files are ignored.
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>conf</term>
                 <listitem>
-                    <para>a scalar string, the name of the configuration file (by default it's SCI/modules/slint/etc/slint.xml).</para>
+                    a string: the name of the configuration file (by default it's <literal>SCI/modules/slint/etc/slint.xml</literal>).
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>out</term>
+                <term>resFilename</term>
                 <listitem>
-                    <para>a scalar string, the name of the output file.</para>
+                    a string: the path + name of the file of results.
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>print</term>
                 <listitem>
-                    <para>a scalar boolean, if true the result is printed else the result is a struct.</para>
+                    a boolean: if true the result is printed else the result is a struct.
                 </listitem>
             </varlistentry>
             <varlistentry>
                 <term>out</term>
                 <listitem>
-                    <para>a struct (if print is false).</para>
+                    a struct (if print is false).
                 </listitem>
             </varlistentry>
         </variablelist>
         <title>Description</title>
         <para>
             slint has been written to check the &quot;quality&quot; of the Scilab's code according to configurable rules.
+       </para>
+        <para>
+            Scripts that list Scilab instructions out of any function can be analyzed, provided that their files have the <literal>.sci</literal> extension.
         </para>
+        <warning>
+            The Scilab code to be analyzed must show no error at compilation time.
+        </warning>
     </refsection>
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
-slint("SCI/modules/elementary_functions/macros/atanm.sci");
-       ]]></programlisting>
+editor SCI/modules/slint/etc/slint.xml   // Main configuration file for criteria
+editor SCI/modules/slint/tests/unit_tests/files/slint_sample.sci;
+slint SCI/modules/slint/tests/unit_tests/files/slint_sample.sci;
+    ]]></programlisting>
+        <programlisting role="no-scilab-exec"><![CDATA[
+// File slint_sample.sci:
+
+function [a,r] = slint_sample(a,b, a)
+    global param  // 1: global keyword
+    sin(abc)      // 3: uninitialized abc not in this scope may have side effects
+    // 3wrongname = 3 // invalid variable name => parse error => stops code-checking
+    // 5: Duplicated function arguments: a.            (reported after line #1)
+    // 5: Function arguments used as output values: a. (reported after line #1)
+    // 5: A function argument must be preceeded by a single space (a,b, a)(reported after line #1)
+    // 7: function returned value might be unused: r   (reported after line #1)
+    a = 1; b = 2; // 9: Two instructions on the same line
+    select a
+    case "a"    // 10: empty block
+    case "b"
+        b = 2;
+    else
+        b = 1;
+    end
+    mclose("all");  // 11: The instruction mclose("all") may have any side effects.
+                 // 12: McCabe code complexity
+    a = 1d3      // 13: Bad decimal exponent: "e" or "E"  instead of "d" or "D"
+    printf("%s %3.2f %d", 3, "abc")           // 14: too few data wrt expected ones
+    printf("%s %3.2f %d", 3, "abc", %pi, %t)  // 14: too many data wrt expected ones
+    // 15: Maximum line length exceeded at lines #, #, .. (reported after line #1)
+    // TODO: check codechecker codes // 17: TODO exists
+    a > %nan      // 18: Comparison with NaN
+    b == (a + 1)  // 19: == instead of =
+    b - 2         // 20: Possible useless operation: Unassigned result
+    for i = 1:3
+        break
+        b = 3   // 21: Unreachable code => !undetected: BUG
+        return
+        c = 3   // 21: Unreachable code => OK
+    end
+    xpause(1000)  // 22: deprecated function
+    select a      // 23: Missing else case
+    case "a"
+        b = 1;
+    case 3
+        b = %pi;
+    end
+    select a      // 23: Select with only one case: could be replaced with an if statement.
+    case "a"
+        b = 2;
+    else
+        b = 1;
+    end
+    a = 1:%inf;    // 24: Invalid list, it contains NaN or Inf.
+    b = %nan:10;   // 24: Invalid list, it contains NaN or Inf.
+    c = 3:(2:5);   // 24: Bad use of ':' operator.
+    s = struct("r", %pi, "p")   // 25: missing value in a struct definition
+    s = struct("r", %pi, %e)    // 25: missing field name in a struct definition
+    save(TMPDIR + "/test.tmp", a)  // 26: variable's name expected instead of variable's handle
+    b = @a         // 27: deprecated @ not operator
+    a = b+2        // 28: Binary operator should be surrounded by single spaces
+    a = linspace(1,3,10);  // 29: A function argument must be preceded by a single space.
+    if a == 3 then
+        if b == 4
+            if c == 5
+                if d == 6  // 31: Too many nested blocks: 3 max.
+                    a = 1;
+                end
+            end
+        end
+    end
+    if a | b | c | d | e | f // 32: Number of expressions in condition is limited: 5 max.
+        e = %eps;
+    end
+    c = a & b == d;   // 33: Expression is not bracketed.
+    c = ~~b           // 34: double negation
+    disp("Hello")     // 35: Illegal call
+                      // 36: minimal ratio lines of comments/code. Here all is OK
+    slint_sample(b = 10, 3); // 37: Argument b declared at position 2 and assigned at position 1.
+    a = mopen("abcd.txt"); // 38: Function mopen requires an error checking just after the call.
+    a = %f            // 39: ';' expected at end of line
+endfunction
+    ]]></programlisting>
     </refsection>
     <refsection role="see also">
         <title>See also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="GlobalKeywordChecker">GlobalKeyword</link>
-            </member>
-            <member>
-                <link linkend="RedefinitionChecker">Redefinition</link>
-            </member>
-            <member>
-                <link linkend="VariablesChecker">Variables</link>
-            </member>
-            <member>
-                <link linkend="FunctionNameChecker">FunctionName</link>
-            </member>
-            <member>
-                <link linkend="FunctionArgsChecker">FunctionArgs</link>
-            </member>
-            <member>
-                <link linkend="UselessArgChecker">UselessArg</link>
-            </member>
-            <member>
-                <link linkend="VariableNameChecker">VariableName</link>
-            </member>
-            <member>
-                <link linkend="SingleInstrChecker">SingleInstr</link>
-            </member>
-            <member>
-                <link linkend="EmptyBlockChecker">EmptyBlock</link>
-            </member>
-            <member>
-                <link linkend="MopenMcloseChecker">MopenMclose</link>
-            </member>
-            <member>
-                <link linkend="McCabeChecker">McCabe</link>
-            </member>
-            <member>
-                <link linkend="DecimalChecker">Decimal</link>
-            </member>
-            <member>
-                <link linkend="PrintfChecker">Printf</link>
-            </member>
-            <member>
-                <link linkend="LineLengthChecker">LineLength</link>
-            </member>
-            <member>
-                <link linkend="LinesCountChecker">LinesCount</link>
-            </member>
-            <member>
-                <link linkend="TodoChecker">Todo</link>
-            </member>
-            <member>
-                <link linkend="NaNChecker">NaN</link>
-            </member>
-            <member>
-                <link linkend="EqEqChecker">EqEq</link>
+                <link linkend="codechecking_criteria">Checking codes and criteria</link>
             </member>
             <member>
-                <link linkend="UselessOpChecker">UselessOp</link>
+                <link linkend="debug">debug</link>
             </member>
             <member>
-                <link linkend="UnreachableCodeChecker">UnreachableCode</link>
+                <link linkend="covStart">coverage</link>
             </member>
             <member>
-                <link linkend="DeprecatedChecker">Deprecated</link>
+                <link linkend="test_run">test_run</link>
             </member>
             <member>
-                <link linkend="SelectChecker">Select</link>
-            </member>
-            <member>
-                <link linkend="ImplicitListChecker">ImplicitList</link>
-            </member>
-            <member>
-                <link linkend="StructChecker">Struct</link>
-            </member>
-            <member>
-                <link linkend="LoadSaveChecker">LoadSave</link>
-            </member>
-            <member>
-                <link linkend="OldNotChecker">OldNot</link>
-            </member>
-            <member>
-                <link linkend="SpacesInArgsChecker">SpacesInArgs</link>
-            </member>
-            <member>
-                <link linkend="BreaksInLoopChecker">BreaksInLoop</link>
-            </member>
-            <member>
-                <link linkend="NestedBlocksChecker">NestedBlocks</link>
-            </member>
-            <member>
-                <link linkend="StatInCondChecker">StatInCond</link>
-            </member>
-            <member>
-                <link linkend="BracketedExpChecker">BracketedExp</link>
-            </member>
-            <member>
-                <link linkend="NotNotChecker">NotNot</link>
-            </member>
-            <member>
-                <link linkend="IllegalCallsChecker">IllegalCalls</link>
-            </member>
-            <member>
-                <link linkend="CommentRatioChecker">CommentRatio</link>
-            </member>
-            <member>
-                <link linkend="FunctionArgsOrderChecker">FunctionArgsOrder</link>
-            </member>
-            <member>
-                <link linkend="FunctionTestReturnChecker">FunctionTestReturn</link>
-            </member>
-            <member>
-                <link linkend="SemicolonAtEOLChecker">SemicolonAtEOL</link>
-            </member>
-            <member>
-                <link linkend="ReturnsCountChecker">ReturnsCount</link>
-            </member>
-            <member>
-                <link linkend="NotEqualChecker">NotEqual</link>
+                <link linkend="edit">edit</link>
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.0</revnumber>
+                <revdescription>
+                    slint introduced
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
diff --git a/scilab/modules/slint/tests/unit_tests/files/slint_sample.sci b/scilab/modules/slint/tests/unit_tests/files/slint_sample.sci
new file mode 100644 (file)
index 0000000..10acbf0
--- /dev/null
@@ -0,0 +1,86 @@
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2016 - Samuel GOUGEON
+//
+// Copyright (C) 2012 - 2016 - Scilab Enterprises
+//
+// This file is hereby licensed under the terms of the GNU GPL v2.0,
+// pursuant to article 5.3.4 of the CeCILL v.2.1.
+// This file was originally licensed under the terms of the CeCILL v2.1,
+// and continues to be available under such terms.
+// For more information, see the COPYING file which you should have received
+// along with this program.
+
+function [a,r] = slint_sample(a,b, a)
+    global param  // 1: global keyword
+    sin(abc)      // 3: uninitialized abc not in this scope may have side effects
+    // 3wrongname = 3 // invalid variable name => parse error => stops code-checking
+    // 5: Duplicated function arguments: a.            (reported after line #1)
+    // 5: Function arguments used as output values: a. (reported after line #1)
+    // 5: A function argument must be preceeded by a single space (a,b, a)(reported after line #1)
+    // 7: function returned value might be unused: r   (reported after line #1)
+    a = 1; b = 2; // 9: Two instructions on the same line
+    select a
+    case "a"    // 10: empty block
+    case "b"
+        b = 2;
+    else
+        b = 1;
+    end
+    mclose("all");  // 11: The instruction mclose("all") may have any side effects.
+                 // 12: McCabe code complexity
+    a = 1d3      // 13: Bad decimal exponent: "e" or "E"  instead of "d" or "D"
+    printf("%s %3.2f %d", 3, "abc")           // 14: too few data wrt expected ones
+    printf("%s %3.2f %d", 3, "abc", %pi, %t)  // 14: too many data wrt expected ones
+    // 15: Maximum line length exceeded at lines #, #, .. (reported after line #1)
+    // TODO: check codechecker codes // 17: TODO exists
+    a > %nan      // 18: Comparison with NaN
+    b == (a + 1)  // 19: == instead of =
+    b - 2         // 20: Possible useless operation: Unassigned result
+    for i = 1:3
+        break
+        b = 3   // 21: Unreachable code => !undetected: BUG
+        return
+        c = 3   // 21: Unreachable code => OK
+    end
+    xpause(1000)  // 22: deprecated function
+    select a      // 23: Missing else case
+    case "a"
+        b = 1;
+    case 3
+        b = %pi;
+    end
+    select a     //23: Select with only one case: could be replaced with an if statement.
+    case "a"
+        b = 2;
+    else
+        b = 1;
+    end
+    a = 1:%inf;    // 24: Invalid list, it contains NaN or Inf.
+    b = %nan:10;   // 24: Invalid list, it contains NaN or Inf.
+    c = 3:(2:5);   // 24: Bad use of ':' operator.
+    s = struct("r", %pi, "p")   // 25: missing value in a struct definition
+    s = struct("r", %pi, %e)    // 25: missing field name in a struct definition
+    save(TMPDIR + "/test.tmp", a)  // 26: variable's name expected instead of variable's handle
+    b = @a         // 27: deprecated @ not operator
+    a = b+2        // 28: Binary operator should be surrounded by single spaces
+    a = linspace(1,3,10);  // 29: A function argument must be preceded by a single space.
+    if a == 3 then
+        if b == 4
+            if c == 5
+                if d == 6  // 31: Too many nested blocks: 3 max.
+                    a = 1;
+                end
+            end
+        end
+    end
+    if a | b | c | d | e | f // 32: Number of expressions in condition is limited: 5 max.
+        e = %eps;
+    end
+    c = a & b == d;   // 33: Expression is not bracketed.
+    c = ~~b           // 34: double negation
+    disp("Hello")     // 35: Illegal call
+                      // 36: minimal ratio lines of comments/code. Here all is OK
+    slint_sample(b = 10, 3); // 37: Argument b declared at position 2 and assigned at position 1.
+    a = mopen("abcd.txt"); // 38: Function mopen requires an error checking just after the call.
+    a = %f            // 39: ';' expected at end of line
+endfunction