Changes between Initial Version and Version 1 of Documentation/T3D/Log-Output/Warnings


Ignore:
Timestamp:
06/03/10 15:59:45 (16 years ago)
Author:
zeiss
Comment:

Importing pages from "/var/lib/svn/trac/etsicheck2" using WikiImport plugin.

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/T3D/Log-Output/Warnings

    v1 v1  
     1=== Warnings === 
     2 
     3Warnings are associated with problems that occur during the documentation generation process or violations of certain norms as specified in the Documentation Specification part of the TTCN-3 standard (ES 201 873-10). These warnings resemble the warnings in T3C quality checks and due to this fact, these features may be moved to T3C in the future. It possible to turn each check or group of checks (a large portion of the checks falls under the ''consistent tag usage'' category) on and off as described in the configuration section. 
     4 
     5==== Empty Tags ==== 
     6 
     7In case a tagged paragraph is specified, but the tag body is empty, a corresponding warning will be issued with the location of the occurrence. 
     8 
     9'''Example''' 
     10{{{ 
     11/* 
     12 * @remark 
     13*/ 
     14}}} 
     15 
     16will result in: 
     17 
     18{{{ 
     19testFile.ttcn: 17: WARNING: Empty tag found: @remark 
     20}}} 
     21 
     22Note that the warnings currently refer to the line number of the module definition and not of the documentation tag itself. This concerns all warning messages. 
     23 
     24==== Misplaced Tags ==== 
     25 
     26The use of certain tags in tagged paragraphs is restricted to certain contexts. If a documentation tag is used in association with a module definition that does not permit the use of such a tag a warning will be issued. 
     27 
     28'''Example'''   
     29{{{ 
     30/* 
     31 * @config text 
     32*/ 
     33function f1(){ 
     34     ... 
     35} 
     36}}} 
     37 
     38would produce  
     39 
     40{{{ 
     41testFile.ttcn: 31: WARNING: @config tag found (may not be used here) 
     42}}} 
     43 
     44==== Identical Description Tags ==== 
     45If identical description tags (@desc) are used to describe two or more different element definitions within all the processed modules, a warning will be thrown. The identity checking mechanism so far is rather simple, based on a direct string comparison. An alternative approach may be implemented in the future, using a different notion of identity, shall this become necessary. 
     46 
     47'''Example''' 
     48{{{ 
     49/* 
     50 * @desc Descrption1 
     51*/ 
     52function f1(){ 
     53     ... 
     54} 
     55/* 
     56 * @desc Descrption1 
     57*/ 
     58function f2(){ 
     59     ... 
     60} 
     61}}} 
     62 
     63results in  
     64 
     65{{{ 
     66testFile.ttcn: 31: WARNING: Identical @desc tag found: "Descrption1" (testFile.ttcn:37) 
     67}}} 
     68 
     69==== Too Many Tags ==== 
     70 
     71While certain tags may occur multiple times (e.g. @author tags), other can only occur once. If a tag that can occur only once per definition as specified in the standard, occurs multiple times a warning will be thrown. 
     72 
     73'''Example''' 
     74{{{ 
     75/* 
     76 * @version 0.01 
     77 * @version 0.02 
     78*/ 
     79function f1(){ 
     80     ... 
     81} 
     82}}} 
     83 
     84will result in 
     85 
     86{{{ 
     87testFile.ttcn: 31: WARNING: Multiple @version tags found (may only contain one) 
     88}}} 
     89 
     90==== Undocumented Parameters ==== 
     91 
     92Formal parameters shall be described by means of the corresponding @param tags. If this is not the case and if '''showUndocumentedParameters''' is enabled in the configuration profile, a warning will be thrown. 
     93 
     94'''Example''' 
     95{{{ 
     96/* 
     97 * @param a Description of Parameter a 
     98*/ 
     99function f1(integer a, boolean b){ 
     100     ... 
     101} 
     102}}} 
     103 
     104will result in 
     105 
     106{{{ 
     107testFile.ttcn: 31: WARNING: Undocumented parameter found: b 
     108}}} 
     109 
     110'''Note:''' There are more subtle details related to the (proper) documentation of formal parameters. In future considerations, these subtleties may be implemented more throroughly.   
     111 
     112==== Documented But Nonexistent Parameters ==== 
     113 
     114If on the other hand a tagged description is present for a formal parameter that is not (or no longer) a part of the module definition, a warning will be issued with details of the occurrence. 
     115 
     116'''Example''' 
     117{{{ 
     118/* 
     119 * @param a Description of a 
     120 * @param b Description of b 
     121*/ 
     122function f1(boolean b){ 
     123     ... 
     124} 
     125}}} 
     126 
     127results in 
     128 
     129{{{ 
     130testFile.ttcn: 31: WARNING: Documented parameter not found: a 
     131}}} 
     132 
     133==== Cyclic Imports ==== 
     134 
     135In adition to the pure documentation-related checks, there is currently also a cyclic imports check, which throws warnings if cyclic imports occur. This is of particular importance for the import view, since cyclic dependencies will be impossible to represent with the current presentation format. Cyclic imports shall also be detected by most compilers since there are a lot more problems associated with them. The warning contains the cyclic import and there is a separate warning for each module that is part of the cycle. 
     136 
     137'''Example''' 
     138{{{ 
     139module mod1{ 
     140    import mod2; 
     141} 
     142module mod2{ 
     143    import mod3; 
     144} 
     145module mod3{ 
     146    import mod1; 
     147} 
     148}}} 
     149 
     150produces three warnings 
     151 
     152{{{ 
     153mod1.ttcn: 1: WARNING: Cyclic imports found: mod1 -> mod2 -> mod3 -> mod1 
     154mod2.ttcn: 1: WARNING: Cyclic imports found: mod2 -> mod3 -> mod1 -> mod2 
     155mod3.ttcn: 1: WARNING: Cyclic imports found: mod3 -> mod1 -> mod2 -> mod3 
     156}}}