srcanamdw/codescanner/scripts/resources/English.loc
author noe\swadi
Thu, 18 Feb 2010 12:29:02 +0530
changeset 1 22878952f6e2
permissions -rw-r--r--
Committing the CodeScanner Core tool This component has been moved from the StaticAnaApps package. BUG : 5889 (http://developer.symbian.org/webbugs/show_bug.cgi?id=5889).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     1
#
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     2
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     3
# All rights reserved.
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     4
# 
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     5
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     6
# 
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     7
# * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     8
# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     9
# * Neither the name of Nokia Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    10
# 
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    11
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    12
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    13
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    14
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    15
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    16
#
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    17
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    18
# English.loc
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    19
# localised string for Script accessArrayElementWithoutCheck
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    20
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    21
stringPool[ "accessArrayElementWithoutCheck!title" ]       = "Array element accessed by At() function without checking index is within array range"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    22
stringPool[ "accessArrayElementWithoutCheck!description" ] = "Whenever an element in an array is accessed, the index should be checked to ensure that it is less than array.Count(). CodeScanner checks for explicit calls to a Count() function; so if the array index is checked in a different way, it gives false positives. Accessing an invalid index can cause a panic."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    23
stringPool[ "accessArrayElementWithoutCheck!ideTitle" ]    = "array element accessed by At() function without checking index is within array range"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    24
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    25
# localised string for Script accessArrayElementWithoutCheck2
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    26
stringPool[ "accessArrayElementWithoutCheck2!title" ]       = "Array element accessed by [] without checking range"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    27
stringPool[ "accessArrayElementWithoutCheck2!description" ] = "Whenever an element in an array is accessed, the index should first be checked to ensure that it is within range. CodeScanner checks for explicit calls to a Count() or Length() function; so if the array index is checked in a different way, it gives false positives. Accessing an invalid index can cause a panic."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    28
stringPool[ "accessArrayElementWithoutCheck2!ideTitle" ]    = "array element accessed by [] without checking range"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    29
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    30
# localised string for Script activestart
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    31
stringPool[ "activestart!title" ]       = "Using CActiveScheduler::Start"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    32
stringPool[ "activestart!description" ] = "Using CActiveScheduler::Start() can mean that something asynchronous is being made synchronous. Instead, use active objects correctly in an asynchronous way."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    33
stringPool[ "activestart!ideTitle" ]    = "using CActiveScheduler::Start"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    34
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    35
# localised string for Script activestop
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    36
stringPool[ "activestop!title" ]       = "Using CActiveScheduler::Stop"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    37
stringPool[ "activestop!description" ] = "Using CActiveScheduler::Stop() can mean that something asynchronous is being made synchronous. Instead, use active objects correctly in an asynchronous way."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    38
stringPool[ "activestop!ideTitle" ]    = "using CActiveScheduler::Stop"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    39
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    40
# localised string for Script arraypassing
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    41
stringPool[ "arraypassing!title" ]       = "Passing arrays by value rather than reference"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    42
stringPool[ "arraypassing!description" ] = "Passing arrays by value causes the array to be copied needlessly, which takes up time and memory. For efficiency, references should be used."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    43
stringPool[ "arraypassing!ideTitle" ]    = "passing arrays by value rather than reference"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    44
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    45
# localised string for Script arrayptrcleanup
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    46
stringPool[ "arrayptrcleanup!title" ]       = "Using local CArrayPtr classes without cleanup items"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    47
stringPool[ "arrayptrcleanup!description" ] = "It is not enough to push a local CArrayPtr class onto the cleanup stack. A TCleanupItem and callback function must be used to avoid leaking the elements."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    48
stringPool[ "arrayptrcleanup!ideTitle" ]    = "using local CArrayPtr classes without cleanup items"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    49
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    50
# localised string for Script assertdebuginvariant
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    51
stringPool[ "assertdebuginvariant!title" ]       = "__ASSERT_DEBUG with User::Invariant"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    52
stringPool[ "assertdebuginvariant!description" ] = "Replace __ASSERT_DEBUG(<condition>, User::Invariant()) with ASSERT(<condition>), because it is easier to read."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    53
stringPool[ "assertdebuginvariant!ideTitle" ]    = "__ASSERT_DEBUG with User::Invariant"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    54
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    55
# localised string for Script baddefines
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    56
stringPool[ "baddefines!title" ]       = "Lowercase definition names"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    57
stringPool[ "baddefines!description" ] = "Badly-named definitions makes the code harder to maintain and can lead to defects."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    58
stringPool[ "baddefines!ideTitle" ]    = "lowercase definition names"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    59
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    60
# localised string for Script baseconstruct
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    61
stringPool[ "baseconstruct!title" ]       = "Leaving function called before BaseConstructL()"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    62
stringPool[ "baseconstruct!description" ] = "If a leave occurs before BaseConstructL() is called, the system can panic because it is trying to clean up an application that has not been fully initialised."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    63
stringPool[ "baseconstruct!ideTitle" ]    = "leaving method called before BaseConstructL"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    64
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    65
# localised string for Script callActiveObjectWithoutCheckingOrStopping
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    66
stringPool[ "callActiveObjectWithoutCheckingOrStopping!title" ]       = "Active object called without checking whether it is active or canceling it first"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    67
stringPool[ "callActiveObjectWithoutCheckingOrStopping!description" ] = "If an active object is started twice, a panic occurs. CodeScanner picks out places where there is a call to a Start(), Queue(), or After() function on a member variable, without a previous call to IsActive(), Cancel(), or Stop(). In general, if starting a timer, there should at least be a call to IsActive() to ensure that the timer is not already running."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    68
stringPool[ "callActiveObjectWithoutCheckingOrStopping!ideTitle" ]    = "active object called without checking whether it is active or canceling it first"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    69
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    70
# localised string for Script changenotification
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    71
stringPool[ "changenotification!title" ]       = "Using RSAVarChangeNotify to see System Agent changes"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    72
stringPool[ "changenotification!description" ] = "When watching for System Agent changes, use RSystemAgent rather than RSAVarChangeNotify, which can fail."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    73
stringPool[ "changenotification!ideTitle" ]    = "using RSAVarChangeNotify to see System Agent changes"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    74
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    75
# localised string for Script cleanup
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    76
stringPool[ "cleanup!title" ]       = "CleanupStack::Pop(AndDestroy) parameters"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    77
stringPool[ "cleanup!description" ] = "These functions should be called with explicit variable parameters to avoid misalignment."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    78
stringPool[ "cleanup!ideTitle" ]    = "missing CleanupStack::Pop parameter"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    79
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    80
# localised string for Script commentcode
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    81
stringPool[ "commentcode!title" ]       = "Commented-out code"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    82
stringPool[ "commentcode!description" ] = "Instances of code that are commented out make the code hard to maintain and to interpret clearly. The commented out code should be removed. Any requirement to rediscover old code should be made through source control and not by trawling through commented-out code."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    83
stringPool[ "commentcode!ideTitle" ]    = "commented-out code"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    84
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    85
# localised string for Script connect
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    86
stringPool[ "connect!title" ]       = "Ignoring Connect() return value"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    87
stringPool[ "connect!description" ] = "Ignoring the error returned from Connect() functions means that if the Connect() function fails due to OOM or other problems, the next access to the resource will panic."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    88
stringPool[ "connect!ideTitle" ]    = "ignoring Connect() return value"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    89
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    90
# localised string for Script ConnectAndDontCloseMemberVariable
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    91
stringPool[ "ConnectAndDontCloseMemberVariable!title" ]       = "Calling Connect() or Open() on a member variable without calling Close() in the destructor"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    92
stringPool[ "ConnectAndDontCloseMemberVariable!description" ] = "If Connect() or Open() is called on any member variable, then Close() must be called in the destructor."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    93
stringPool[ "ConnectAndDontCloseMemberVariable!ideTitle" ]    = "calling Connect() or Open() on a member variable without calling Close() in the destructor"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    94
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    95
# localised string for Script constnames
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    96
stringPool[ "constnames!title" ]       = "Badly-named constants"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    97
stringPool[ "constnames!description" ] = "Badly-named constant will make the source code harder to maintain and make defects more likely."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    98
stringPool[ "constnames!ideTitle" ]    = "badly-named constant"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    99
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   100
# localised string for Script consttdescptr
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   101
stringPool[ "consttdescptr!title" ]       = "Const descriptor pointer as argument"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   102
stringPool[ "consttdescptr!description" ] = "Use \"const TDesC&\" instead of \"const TDesC*\"."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   103
stringPool[ "consttdescptr!ideTitle" ]    = "const descriptor pointer as argument"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   104
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   105
# localised string for Script controlornull
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   106
stringPool[ "controlornull!title" ]       = "Accessing return value of ControlOrNull()"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   107
stringPool[ "controlornull!description" ] = "The return value might be NULL, so it should be checked before access."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   108
stringPool[ "controlornull!ideTitle" ]    = "accessing return value of ControlOrNull()"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   109
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   110
# localised string for Script crepository
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   111
stringPool[ "crepository!title" ]       = "Ignoring CRepository::get() return value"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   112
stringPool[ "crepository!description" ] = "Independent application cannot assume that the Central Repository is set up fully. This means the return value of CRepository::get() cannot be ignored."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   113
stringPool[ "crepository!ideTitle" ]    = "ignoring CRepository::get() return value"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   114
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   115
# localised string for Script ctltargettype
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   116
stringPool[ "ctltargettype!title" ]       = "Use of targettype ctl"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   117
stringPool[ "ctltargettype!description" ] = "The ctl target type should not be used. Instead, use DLL and explicitly refer to the Control Panel's DEF file. Note: Code that causes this issue only needs attention if it is found in code developed for Nokia Series 90 code that has extra exports for resetting the Control Panel item's data."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   118
stringPool[ "ctltargettype!ideTitle" ]    = "use of targettype ctl"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   119
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   120
# localised string for Script customizableicons
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   121
stringPool[ "customizableicons!title" ]       = "Use of customizable icons"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   122
stringPool[ "customizableicons!description" ] = "Due to device customization requirements, independent application must not remove any customization done by the variant team. This means independent application cannot include customizable icons."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   123
stringPool[ "customizableicons!ideTitle" ]    = "use of customizable icons"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   124
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   125
# localised string for Script debugrom
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   126
stringPool[ "debugrom!title" ]       = "Debug components in ROM"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   127
stringPool[ "debugrom!description" ] = "Debug versions of components in the ROM could mean that ROM space is being taken up with debugging information or that logging is being put out. Release versions should be in the ROM unless there is a good reason why they are not."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   128
stringPool[ "debugrom!ideTitle" ]    = "debug components in ROM"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   129
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   130
# localised string for Script declarename
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   131
stringPool[ "declarename!title" ]       = "Use of __DECLARE_NAME"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   132
stringPool[ "declarename!description" ] = "The __DECLARE_NAME macro is historical and serves no purpose anymore and should be removed."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   133
stringPool[ "declarename!ideTitle" ]    = "use of __DECLARE_NAME"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   134
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   135
# localised string for Script deleteMemberVariable
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   136
stringPool[ "deleteMemberVariable!title" ]       = "Member variable deleted incorrectly"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   137
stringPool[ "deleteMemberVariable!description" ] = "When a member variable is deleted, it should be assigned either to NULL or to another value. This prevents accidental access of the deleted object. If a NewL() or other leaving function is called to reassign the member variable, it should first be assigned to NULL in case that function leaves."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   138
stringPool[ "deleteMemberVariable!ideTitle" ]    = "member variable deleted incorrectly"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   139
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   140
# localised string for Script destructor
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   141
stringPool[ "destructor!title" ]       = "Pointer access in destructors"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   142
stringPool[ "destructor!description" ] = "Accessing pointers to objects in destructors without checking whether they are not NULL could result in a panic because they may not have been constructed. The pointers should be checked to determine whether they are owned objects. If they are not owned, they should really be references rather than pointers."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   143
stringPool[ "destructor!ideTitle" ]    = "destructor is accessing/dereferencing data member"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   144
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   145
# localised string for Script doubleSemiColon
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   146
stringPool[ "doubleSemiColon!title" ]       = "Use of double semicolon"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   147
stringPool[ "doubleSemiColon!description" ] = "Double semicolons at the end of a line are not necessary and cause a CodeWarrior compiler error."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   148
stringPool[ "doubleSemiColon!ideTitle" ]    = "use of double semicolon"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   149
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   150
# localised string for Script driveletters
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   151
stringPool[ "driveletters!title" ]       = "Hard-coded drive letters"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   152
stringPool[ "driveletters!description" ] = "Drive letters should not be hard-coded."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   153
stringPool[ "driveletters!ideTitle" ]    = "hard-coded drive letters"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   154
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   155
# localised string for Script eikbuttons
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   156
stringPool[ "eikbuttons!title" ]       = "Checks that the R_EIK_BUTTONS_* resources are not being used"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   157
stringPool[ "eikbuttons!description" ] = "R_EIK_BUTTONS_* resources will not be internationalised, and should not be used. Instead, create your own button resource. No button resource (or indeed, rls string) should be used in more than one location. Note: This issue is only relevant for development on Nokia platforms."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   158
stringPool[ "eikbuttons!ideTitle" ]    = "use of R_EIK_BUTTONS_ resources"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   159
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   160
# localised string for Script eikonenvstatic
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   161
stringPool[ "eikonenvstatic!title" ]       = "Using CEikonEnv::Static"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   162
stringPool[ "eikonenvstatic!description" ] = "CEikonEnv::Static() calls should be kept to a minimum, because this involves TLS. All applications, controls, and dialogs already have a pointer to the singleton instance of CEikonEnv as a member variable and so do not need to find it again. If a class does not have access to a CEikonEnv and needs to use it repeatedly, then it should store one."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   163
stringPool[ "eikonenvstatic!ideTitle" ]    = "using CEikonEnv::Static"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   164
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   165
# localised string for Script enummembers
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   166
stringPool[ "enummembers!title" ]       = "Enums with badly-named members"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   167
stringPool[ "enummembers!description" ] = "Enums with badly-named members make the code harder to maintain and may cause defects."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   168
stringPool[ "enummembers!ideTitle" ]    = "enum with badly-named member"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   169
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   170
# localised string for Script enumnames
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   171
stringPool[ "enumnames!title" ]       = "Badly-named enums"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   172
stringPool[ "enumnames!description" ] = "Badly-named enums make the code harder to maintain and may cause defects."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   173
stringPool[ "enumnames!ideTitle" ]    = "badly-named enum"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   174
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   175
# localised string for Script exportinline
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   176
stringPool[ "exportinline!title" ]       = "Exporting inline functions"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   177
stringPool[ "exportinline!description" ] = "Inline functions should not be exported because this can cause those that link to the DLL to fail to build. Exporting functions limits the changes that can be made in the future due to considerations of binary-compatibility."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   178
stringPool[ "exportinline!ideTitle" ]    = "exporting inline functions"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   179
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   180
# localised string for Script exportpurevirtual
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   181
stringPool[ "exportpurevirtual!title" ]       = "Exporting pure virtual functions"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   182
stringPool[ "exportpurevirtual!description" ] = "Symbian recommends against the exportation of pure virtual functions."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   183
stringPool[ "exportpurevirtual!ideTitle" ]    = "exporting pure virtual functions"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   184
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   185
# localised string for Script externaldriveletters
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   186
# stringPool[ "externaldriveletters!title" ]       = "Hard-coded external drive letters"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   187
# stringPool[ "externaldriveletters!description" ] = "External drive letters should not be hard-coded as the external drive may change between platforms and releases. This may cause confusion over ownership leading to classes being deleted erroneously and leaks occurring."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   188
# stringPool[ "externaldriveletters!ideTitle" ]    = "hard-coded external drive letter"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   189
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   190
# localised string for Script flags
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   191
stringPool[ "flags!title" ]       = "Use of R&D flags or feature flags"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   192
stringPool[ "flags!description" ] = "Independent application must not use R&D flags nor feature flags via preprocessor statements in the source code. This means bld*.hrh and productvariant.hrh should not be used."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   193
stringPool[ "flags!ideTitle" ]    = "use of R&D flags or feature flags"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   194
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   195
# localised string for Script foff
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   196
stringPool[ "foff!title" ]       = "Use of _FOFF"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   197
stringPool[ "foff!description" ] = "_FOFF allows access to data in classes that were not intended for public access. This may cause problems, especially when the location of the data changes."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   198
stringPool[ "foff!ideTitle" ]    = "use of _FOFF"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   199
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   200
# localised string for Script forbiddenwords
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   201
stringPool[ "forbiddenwords!title" ]       = "Use of forbidden words in header files"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   202
stringPool[ "forbiddenwords!description" ] = "Some words should not be used in header files; especially those header files destined for external release. Some words may be forbidden for legal reasons or for platform consistency. Where they exist, alternative allowed words should be used. For example, \"NMP\" and \"Nokia Mobile Phones\" should be replaced by \"Nokia\"."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   203
stringPool[ "forbiddenwords!ideTitle" ]    = "use of forbidden words in header files"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   204
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   205
# localised string for Script forgottoputptroncleanupstack
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   206
stringPool[ "forgottoputptroncleanupstack!title" ]       = "Neglected to put variable on cleanup stack"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   207
stringPool[ "forgottoputptroncleanupstack!description" ] = "If a variable is not put on the cleanup stack and a leaving function or ELeave is called, a memory leak occurs. CodeScanner occasionally gives false positives for this issue. Individual cases should be investigated."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   208
stringPool[ "forgottoputptroncleanupstack!ideTitle" ]    = "neglected to put variable on cleanup stack"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   209
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   210
# localised string for Script friend
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   211
stringPool[ "friend!title" ]       = "Use of friends"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   212
stringPool[ "friend!description" ] = "The friend directive is often misused and can indicate problems in the OO design."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   213
stringPool[ "friend!ideTitle" ]    = "use of friends"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   214
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   215
# localised string for Script goto
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   216
stringPool[ "goto!title" ]       = "Use of goto"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   217
stringPool[ "goto!description" ] = "Goto should not be used if it can be avoided because it makes the program flow more difficult to follow."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   218
stringPool[ "goto!ideTitle" ]    = "use of goto"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   219
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   220
# localised string for Script ifassignments
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   221
stringPool[ "ifassignments!title" ]       = "Assignment in an If statement"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   222
stringPool[ "ifassignments!description" ] = "Assignments inside an If statement often indicate that the assignment was not intended. Even if the assignment was intended, it is clearer to separate out the assignment from the conditional. The script that detects such occurrences has a few false positives when the action statements are on the same line as the conditional check. However, this is also against the coding standards and the action should be on a separate line."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   223
stringPool[ "ifassignments!ideTitle" ]    = "assignment in an If statement"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   224
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   225
# localised string for Script ifpreprocessor
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   226
stringPool[ "ifpreprocessor!title" ]       = "Use of #if in .h files"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   227
stringPool[ "ifpreprocessor!description" ] = "#if in header files should only be used before the main include guards and not around #include statements or around functional blocks in class definitions. The reason for the latter is to aid readability and to make BC breaks more difficult."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   228
stringPool[ "ifpreprocessor!ideTitle" ]    = "use of #if in .h files (not as main include guards)"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   229
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   230
# localised string for Script inheritanceorder
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   231
stringPool[ "inheritanceorder!title" ]       = "Incorrect inheritance order of M and C classes"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   232
stringPool[ "inheritanceorder!description" ] = "If a C class inherits first from an M class and then a C class, a panic can occur when trying to pop a CBase pointer pointing to such a class from the cleanup stack when in fact a pointer pointing to the first predecessor, the mixin class, was popped instead."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   233
stringPool[ "inheritanceorder!ideTitle" ]    = "incorrect inheritance order of M and C classes"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   234
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   235
# localised string for Script intleaves
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   236
stringPool[ "intleaves!title" ]       = "Methods that leave AND return a TInt error"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   237
stringPool[ "intleaves!description" ] = "Returning an error code as well as being able to leave is problematical for the caller. It is preferable to adhere to one method of returning the error. Note: CodeScanner is likely to return false positives for this situation, because some returned TInt values will not be error codes."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   238
stringPool[ "intleaves!ideTitle" ]    = "methods that leave AND return a TInt error"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   239
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   240
# localised string for Script jmp
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   241
stringPool[ "jmp!title" ]       = "Use of setjmp and/or longjmp"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   242
stringPool[ "jmp!description" ] = "Using setjmp and/or longjmp makes code less maintainable."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   243
stringPool[ "jmp!ideTitle" ]    = "use of setjmp and/or longjmp"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   244
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   245
# localised string for Script leave
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   246
stringPool[ "leave!title" ]       = "Leaving functions called in non-leaving functions"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   247
stringPool[ "leave!description" ] = "Non-leaving functions should not call leaving functions. Note: Operator functions are considered to be able to leave when scanning the code inside them."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   248
stringPool[ "leave!ideTitle" ]    = "leaving function called in non-leaving function"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   249
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   250
# localised string for Script LeaveNoError
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   251
stringPool[ "LeaveNoError!title" ]       = "Leaving with KErrNone"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   252
stringPool[ "LeaveNoError!description" ] = "Leaving with KErrNone usually indicates that there is a makeshift way around a design issue rather than a true and proper fix to the architecture."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   253
stringPool[ "LeaveNoError!ideTitle" ]    = "leaving with KErrNone"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   254
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   255
# localised string for Script leavingoperators
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   256
stringPool[ "leavingoperators!title" ]       = "Leaving functions called in operator functions"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   257
stringPool[ "leavingoperators!description" ] = "It is not obvious that operator functions can leave. Calling leaving functions in operator functions should be considered carefully."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   258
stringPool[ "leavingoperators!ideTitle" ]    = "leaving functions called in operator functions"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   259
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   260
# localised string for Script LFunctionCantLeave
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   261
stringPool[ "LFunctionCantLeave!title" ]       = "L-functions that cannot leave"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   262
stringPool[ "LFunctionCantLeave!description" ] = "A function should not be named with an 'L' if it cannot leave. The only exception is in virtual functions where the function name is defined in the base class so the L cannot be removed. For example, RunL()."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   263
stringPool[ "LFunctionCantLeave!ideTitle" ]    = "L-functions that cannot leave"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   264
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   265
# localised string for Script longlines
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   266
stringPool[ "longlines!title" ]       = "Overly long lines of code"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   267
stringPool[ "longlines!description" ] = "Lines longer than about 100 characters can indicate messy or badly-structured code that is hard to maintain."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   268
stringPool[ "longlines!ideTitle" ]    = "overly long line of code"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   269
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   270
# localised string for Script magicnumbers
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   271
stringPool[ "magicnumbers!title" ]       = "Use of magic numbers"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   272
stringPool[ "magicnumbers!description" ] = "Magic numbers - that is, numbers that are hard-coded into the source code and instead of being presented as constants - make code difficult to maintain and give no indication of why a calculation is the way it is. Magic numbers should be replaced with named constants."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   273
stringPool[ "magicnumbers!ideTitle" ]    = "use of magic numbers"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   274
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   275
# localised string for Script mclassdestructor
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   276
stringPool[ "mclassdestructor!title" ]       = "M class has destructor"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   277
stringPool[ "mclassdestructor!description" ] = "M classes should not contain a destructor."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   278
stringPool[ "mclassdestructor!ideTitle" ]    = "M class has destructor"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   279
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   280
# localised string for Script memberlc
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   281
stringPool[ "memberlc!title" ]       = "Assigning LC methods to member variables"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   282
stringPool[ "memberlc!description" ] = "Objects on the cleanup stack should not be assigned to member variables"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   283
stringPool[ "memberlc!ideTitle" ]    = "LC method assigned to data member"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   284
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   285
# localised string for Script membervariablecallld
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   286
stringPool[ "membervariablecallld!title" ]       = "Calling LD function on member variable"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   287
stringPool[ "membervariablecallld!description" ] = "LD functions should not be called on a member variable because ownership can be unclear and may lead to double deletes."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   288
stringPool[ "membervariablecallld!ideTitle" ]    = "calling LD function on member variable"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   289
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   290
# localised string for Script missingcancel
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   291
stringPool[ "missingcancel!title" ]       = "Cancel() not called in active object's destructor"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   292
stringPool[ "missingcancel!description" ] = "Cancel() should always be called in active object's destructor to cancel an outstanding request if there is one. If there is no request pending then Cancel() just does nothing, but if we do not call Cancel() when having an outstanding request a panic will be raised. CodeScanner occasionally gives false positives for this issue. Individual cases should be investigated."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   293
stringPool[ "missingcancel!ideTitle" ]    = "Cancel() not called in active object's destructor"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   294
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   295
# localised string for Script missingcclass
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   296
stringPool[ "missingcclass!title" ]       = "C class not inheriting from another C class"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   297
stringPool[ "missingcclass!description" ] = "All C classes should inherit from another C class to ensure that all data members are zeroed."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   298
stringPool[ "missingcclass!ideTitle" ]    = "C class not inheriting from another C class"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   299
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   300
# localised string for Script mmpsourcepath
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   301
stringPool[ "mmpsourcepath!title" ]       = "Use of absolute path names in MMP files"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   302
stringPool[ "mmpsourcepath!description" ] = "Use of absolute paths in MMP files makes it impossible to relocate the source. Relative paths should be used instead."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   303
stringPool[ "mmpsourcepath!ideTitle" ]    = "use of absolute path names in MMP files"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   304
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   305
# localised string for Script multilangrsc
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   306
stringPool[ "multilangrsc!title" ]       = "Not using BaflUtils::NearestLanguageFile() when loading a resource file"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   307
stringPool[ "multilangrsc!description" ] = "If AddResourceFileL() is used without first using BaflUtils::NearestLanguageFile(), then not all language versions of resources will be picked up."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   308
stringPool[ "multilangrsc!ideTitle" ]    = "not using BaflUtils::NearestLanguageFile() when loading a resource file"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   309
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   310
# localised string for Script multipledeclarations
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   311
stringPool[ "multipledeclarations!title" ]       = "Multiple declarations on one line"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   312
stringPool[ "multipledeclarations!description" ] = "Multiple declarations on one line can be confusing. Separate them out so that each declaration is on its own separate line."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   313
stringPool[ "multipledeclarations!ideTitle" ]    = "multiple declarations on one line"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   314
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   315
# localised string for Script multipleinheritance
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   316
stringPool[ "multipleinheritance!title" ]       = "Non M-class multiple inheritance"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   317
stringPool[ "multipleinheritance!description" ] = "It is bad Symbian OS practice to derive from two classes that have implemented functions. Complex behaviour that was not intended can result."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   318
stringPool[ "multipleinheritance!ideTitle" ]    = "multiple inheritance from non M-classes"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   319
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   320
# localised string for Script mydocs
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   321
stringPool[ "mydocs!title" ]       = "Hard-coded mydocs directory strings"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   322
stringPool[ "mydocs!description" ] = "The mydocs directory is subject to change so should not be referenced directly. Note: @	This issue will only occur in code developed for the Nokia Series 90 platform."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   323
stringPool[ "mydocs!ideTitle" ]    = "hard-coded mydocs directory strings"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   324
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   325
# localised string for Script namespace
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   326
stringPool[ "namespace!title" ]       = "Use of namespace"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   327
stringPool[ "namespace!description" ] = "Namespaces are often used to work around a poor naming convention."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   328
stringPool[ "namespace!ideTitle" ]    = "use of namespace"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   329
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   330
# localised string for Script newlreferences
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   331
stringPool[ "newlreferences!title" ]       = "NewL() returning a reference"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   332
stringPool[ "newlreferences!description" ] = "NewL() and NewLC() functions should return a pointer to an object created on the heap."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   333
stringPool[ "newlreferences!ideTitle" ]    = "NewL() returning a reference"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   334
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   335
# localised string for Script noleavetrap
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   336
stringPool[ "noleavetrap!title" ]       = "TRAP used with no leaving functions"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   337
stringPool[ "noleavetrap!description" ] = "A TRAP is unnecessary if there are no leaving functions."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   338
stringPool[ "noleavetrap!ideTitle" ]    = "TRAP contains no leaving functions"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   339
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   340
# localised string for Script nonconsthbufc
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   341
stringPool[ "nonconsthbufc!title" ]       = "Non-const HBufC* parameter passing"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   342
stringPool[ "nonconsthbufc!description" ] = "HBufC* parameters should almost always be passed as a const pointer."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   343
stringPool[ "nonconsthbufc!ideTitle" ]    = "non-const HBufC* parameter passing"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   344
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   345
# localised string for Script nonconsttdesc
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   346
stringPool[ "nonconsttdesc!title" ]       = "Non-const TDesC& parameter passing"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   347
stringPool[ "nonconsttdesc!description" ] = "TDesC& parameters should be passed as a const. If it is not, it may indicate that the coder does not understand descriptors, for example, passing descriptors by value."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   348
stringPool[ "nonconsttdesc!ideTitle" ]    = "non-const TDesC& parameter passing"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   349
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   350
# localised string for Script nonleavenew
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   351
stringPool[ "nonleavenew!title" ]       = "Use of new without (ELeave)"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   352
stringPool[ "nonleavenew!description" ] = "Using new without (ELeave) is only used in special circumstances. The leaving variant should typically be used in preference. A common exception is for application creation, where NULL is returned for failed creation."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   353
stringPool[ "nonleavenew!ideTitle" ]    = "new used without (ELeave)"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   354
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   355
# localised string for Script nonunicodeskins
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   356
stringPool[ "nonunicodeskins!title" ]       = "Non-Unicode skins"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   357
stringPool[ "nonunicodeskins!description" ] = "Skin definition files (SKN, SKE) must be Unicode. Note: Code that causes this issue only needs attention if it is found in code developed for Nokia Series 90 code."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   358
stringPool[ "nonunicodeskins!ideTitle" ]    = "non-Unicode skins"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   359
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   360
# localised string for Script null
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   361
stringPool[ "null!title" ]       = "NULL equality check"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   362
stringPool[ "null!description" ] = "There is no need to compare pointer variables to NULL. Use If(ptr)."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   363
stringPool[ "null!ideTitle" ]    = "NULL equality check"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   364
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   365
# localised string for Script open
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   366
stringPool[ "open!title" ]       = "Ignoring Open() return value"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   367
stringPool[ "open!description" ] = "Ignoring the return value from Open() functions (due to OOM, etc.) means that when the resource is accessed next, a panic will result."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   368
stringPool[ "open!ideTitle" ]    = "ignoring Open() return value"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   369
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   370
# localised string for Script pointertoarrays
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   371
stringPool[ "pointertoarrays!title" ]       = "Pointer to arrays as members of a C class"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   372
stringPool[ "pointertoarrays!description" ] = "In C classes, there is no need to use pointers to arrays as data members. Instead, use the arrays themselves. Using pointers leads to obscure notation like \"(*array)[n]\" for the more usual \"array[n]\". It also makes it necessary to explicitly delete the arrays in the destructor. Using the arrays themselves also simplifies notation, reduces indirection, and reduces heap fragmentation."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   373
stringPool[ "pointertoarrays!ideTitle" ]    = "pointer to arrays as members of a C class"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   374
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   375
# localised string for Script pragmadisable
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   376
stringPool[ "pragmadisable!title" ]       = "Use of #pragma warning"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   377
stringPool[ "pragmadisable!description" ] = "Disabling warnings can lead to problems, because the warnings are probably there for a reason."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   378
stringPool[ "pragmadisable!ideTitle" ]    = "use of #pragma warning"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   379
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   380
# localised string for Script pragmamessage
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   381
stringPool[ "pragmamessage!title" ]       = "Use of #pragma message"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   382
stringPool[ "pragmamessage!description" ] = "#pragma messages during the build stage can interfere with the build log parsing."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   383
stringPool[ "pragmamessage!ideTitle" ]    = "use of #pragma message"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   384
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   385
# localised string for Script pragmaother
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   386
stringPool[ "pragmaother!title" ]       = "Use of #pragma other than warning and message"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   387
stringPool[ "pragmaother!description" ] = "#pragma directives should only be used in very edge cases (for example, functions consisting of inline assembler without explicit return statements) because, typically, their usage masks valid build warnings and error messages."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   388
stringPool[ "pragmaother!ideTitle" ]    = "use of #pragma other than warning and message"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   389
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   390
# localised string for Script privateinheritance
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   391
stringPool[ "privateinheritance!title" ]       = "Use of private inheritance"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   392
stringPool[ "privateinheritance!description" ] = "Classes should not be inherited privately. If public or protected inheritance is not appropriate, consider using an amalgamation; that is, have an object of that type as a member variable."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   393
stringPool[ "privateinheritance!ideTitle" ]    = "use of private inheritance"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   394
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   395
# localised string for Script pushaddrvar
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   396
stringPool[ "pushaddrvar!title" ]       = "Pushing address of a variable onto the cleanup stack"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   397
stringPool[ "pushaddrvar!description" ] = "If the variable is owned by the code pushing it, it should be stored as a pointer. If it is not, it should not be pushed onto the cleanup stack."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   398
stringPool[ "pushaddrvar!ideTitle" ]    = "pushing address of a variable onto the cleanup stack"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   399
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   400
# localised string for Script pushmember
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   401
stringPool[ "pushmember!title" ]       = "Pushing data members onto the cleanup stack"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   402
stringPool[ "pushmember!description" ] = "Pushing member variables is likely to lead to double deletes or leakage in certain circumstances and so should be avoided. Even if no panic can result, it is bad practice and makes maintenance more difficult."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   403
stringPool[ "pushmember!ideTitle" ]    = "data member pushed to cleanup stack"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   404
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   405
# localised string for Script readresource
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   406
stringPool[ "readresource!title" ]       = "Using ReadResource() instead of ReadResourceL()"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   407
stringPool[ "readresource!description" ] = "ReadResourceL() should always be used in preference to ReadResource() because in an error scenario ReadResource() effectively fails silently. If no check is performed on the resulting descriptor afterwards, unexpected states can ensue. These states are often characterized by buffer overflows."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   408
stringPool[ "readresource!ideTitle" ]    = "Using ReadResource() instead of ReadResourceL()"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   409
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   410
# localised string for Script resourcenotoncleanupstack
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   411
stringPool[ "resourcenotoncleanupstack!title" ]       = "Neglected to put resource objects on cleanup stack"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   412
stringPool[ "resourcenotoncleanupstack!description" ] = "If a stack-based resource object is not put on the cleanup stack with CleanupResetAndDestroyPushL() or CleanupClosePushL(), and a leaving function or ELeave is called, a memory leak occurs. CodeScanner occasionally gives false positives for this issue. Individual cases should be investigated."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   413
stringPool[ "resourcenotoncleanupstack!ideTitle" ]    = "neglected to put resource objects on cleanup stack"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   414
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   415
# localised string for Script resourcesonheap
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   416
stringPool[ "resourcesonheap!title" ]       = "Resource objects on the heap"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   417
stringPool[ "resourcesonheap!description" ] = "There is very rarely any real need to put R classes on the heap (unless they are not real R classes!).  Doing so can lead to inefficiency and cleanup stack problems."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   418
stringPool[ "resourcesonheap!ideTitle" ]    = "resource objects on the heap"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   419
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   420
# localised string for Script returndescriptoroutofscope
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   421
stringPool[ "returndescriptoroutofscope!title" ]       = "Return descriptor out of scope"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   422
stringPool[ "returndescriptoroutofscope!description" ] = "Returning a TBuf descriptor that is declared locally takes it out of scope. This can cause a crash on WINSCW, although not on WINS."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   423
stringPool[ "returndescriptoroutofscope!ideTitle" ]    = "return descriptor out of scope"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   424
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   425
# localised string for Script rfs
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   426
stringPool[ "rfs!title" ]       = "Use of non-pointer/reference RFs"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   427
stringPool[ "rfs!description" ] = "Connecting to an RFs is a time-consuming operation. (It can take approximately 0.1 seconds on some devices.) To minimise wasted time and resources, use the already-connected one in EikonEnv or elsewhere, if possible."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   428
stringPool[ "rfs!ideTitle" ]    = "use of non-pointer/reference RFs"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   429
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   430
# localised string for Script rssnames
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   431
stringPool[ "rssnames!title" ]       = "Duplicate RSS names"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   432
stringPool[ "rssnames!description" ] = "Resource files with clashing NAME fields can cause the wrong resource file to be accessed. This can lead to incorrect functionality or panics."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   433
stringPool[ "rssnames!ideTitle" ]    = "duplicate RSS names"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   434
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   435
# localised string for Script stringliterals
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   436
stringPool[ "stringliterals!title" ]       = "Use of _L string literals"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   437
stringPool[ "stringliterals!description" ] = "_L() string literals should be replaced by the _LIT() macro."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   438
stringPool[ "stringliterals!ideTitle" ]    = "use of _L string literals"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   439
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   440
# localised string for Script stringsinresourcefiles
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   441
stringPool[ "stringsinresourcefiles!title" ]       = "Strings in RSS or RA files"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   442
stringPool[ "stringsinresourcefiles!description" ] = "Strings should not be defined in RSS or RA files. Instead, they should be put in RLS or other localisable files."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   443
stringPool[ "stringsinresourcefiles!ideTitle" ]    = "strings in RSS or RA files"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   444
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   445
# localised string for Script struct
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   446
stringPool[ "struct!title" ]       = "Use of struct"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   447
stringPool[ "struct!description" ] = "C-style structs should not generally be used. The correct idiom is to use a class with public members. A permissible use of a C-style struct is if it is used to group non-semantically related entities together for convenience, and if a class-related hierarchy would be too heavy-weight."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   448
stringPool[ "struct!ideTitle" ]    = "use of struct"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   449
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   450
# localised string for Script tcclasses
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   451
stringPool[ "tcclasses!title" ]       = "T classes inheriting from C classes"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   452
stringPool[ "tcclasses!description" ] = "T classes that are derived from C classes may have a complex constructor and so need to be handled differently. It is better to make the T class into a C class, which will make the code easier to maintain."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   453
stringPool[ "tcclasses!ideTitle" ]    = "T class inherits from C class"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   454
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   455
# localised string for Script tclassdestructor
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   456
stringPool[ "tclassdestructor!title" ]       = "T class has destructor"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   457
stringPool[ "tclassdestructor!description" ] = "T classes should not have a destructor"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   458
stringPool[ "tclassdestructor!ideTitle" ]    = "T class has destructor"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   459
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   460
# localised string for Script todocomments
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   461
stringPool[ "todocomments!title" ]       = "\"To do\" comments"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   462
stringPool[ "todocomments!description" ] = "\"To do\" comments in code suggest that it is not finished."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   463
stringPool[ "todocomments!ideTitle" ]    = "\"To do\" comment"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   464
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   465
# localised string for Script trapcleanup
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   466
stringPool[ "trapcleanup!title" ]       = "Use of LC function in TRAPs"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   467
stringPool[ "trapcleanup!description" ] = "You cannot trap something that leaves something on the cleanup stack because it will panic."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   468
stringPool[ "trapcleanup!ideTitle" ]    = "LC function used in TRAP"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   469
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   470
# localised string for Script trapeleave
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   471
stringPool[ "trapeleave!title" ]       = "Trapping new(ELeave)"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   472
stringPool[ "trapeleave!description" ] = "The trapping of a \"new(ELeave) CXxx\" call is redundant and wasteful as the code to support TRAP is surprisingly large. If the instantiation process really needs not to leave, use \"new CXxx\" and check for NULL."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   473
stringPool[ "trapeleave!ideTitle" ]    = "trapping new(ELeave)"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   474
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   475
# localised string for Script traprunl
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   476
stringPool[ "traprunl!title" ]       = "Trapping of (Do)RunL() rather than using RunError()"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   477
stringPool[ "traprunl!description" ] = "The RunError() function should be used rather than the CActive derivative using its own TRAPD solution within a RunL()."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   478
stringPool[ "traprunl!ideTitle" ]    = "trapping of (Do)RunL() rather than using RunError()"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   479
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   480
# localised string for Script trspassing
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   481
stringPool[ "trspassing!title" ]       = "Passing TRequestStatus parameters by value"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   482
stringPool[ "trspassing!description" ] = "TRequestStatus parameters should be passed by reference. If TRequestStatus is just being used as an error code, then convert it to a TInt."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   483
stringPool[ "trspassing!ideTitle" ]    = "passing TRequestStatus parameters by value"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   484
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   485
# localised string for Script uids
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   486
stringPool[ "uids!title" ]       = "Duplicate UIDs"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   487
stringPool[ "uids!description" ] = "UIDs must be unique."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   488
stringPool[ "uids!ideTitle" ]    = "duplicate UIDs"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   489
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   490
# localised string for Script uncompressedaif
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   491
stringPool[ "uncompressedaif!title" ]       = "Uncompressed AIFs in ROM"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   492
stringPool[ "uncompressedaif!description" ] = "AIF files should be referenced as \"AIF=\" rather than \"data=\" or \"file=\" otherwise they can bloat the ROM size and slow down application loading."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   493
stringPool[ "uncompressedaif!ideTitle" ]    = "uncompressed AIFs in ROM"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   494
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   495
# localised string for Script uncompressedbmp
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   496
stringPool[ "uncompressedbmp!title" ]       = "Uncompressed bitmaps in ROM"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   497
stringPool[ "uncompressedbmp!description" ] = "Using uncompressed bitmaps can significantly bloat the size of ROM images. All occurrences of \"bitmap=\" in iby/hby files should be replaced with \"auto-bitmap=\". Also, including bitmaps using \"data=\" or \"file=\" causes bloat and load-speed reductions."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   498
stringPool[ "uncompressedbmp!ideTitle" ]    = "uncompressed bitmaps in ROM"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   499
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   500
# localised string for Script unicodesource
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   501
stringPool[ "unicodesource!title" ]       = "Unicode source files"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   502
stringPool[ "unicodesource!description" ] = "Having Unicode source files (CPP, H, RLS, LOC, RSS, and RA) will break most build systems."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   503
stringPool[ "unicodesource!ideTitle" ]    = "Unicode source files"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   504
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   505
# localised string for Script userafter
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   506
stringPool[ "userafter!title" ]       = "Use of User::After"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   507
stringPool[ "userafter!description" ] = "Generally, User::After() functions are used to skirt around timing problems. Typically, they should be removed and the defects fixed properly: that is, by waiting for the correct event to continue execution."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   508
stringPool[ "userafter!ideTitle" ]    = "use of User::After"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   509
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   510
# localised string for Script userfree
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   511
stringPool[ "userfree!title" ]       = "Using User::Free directly"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   512
stringPool[ "userfree!description" ] = "User::Free() should never be called, because all objects free their memory on deletion; their destructors are not called and further resources cannot be freed or closed. This function should be removed and replaced by explicit deletes."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   513
stringPool[ "userfree!ideTitle" ]    = "using User::Free directly"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   514
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   515
# localised string for Script userWaitForRequest
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   516
stringPool[ "userWaitForRequest!title" ]       = "Use of User::WaitForRequest"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   517
stringPool[ "userWaitForRequest!description" ] = "User::WaitForRequest() should not generally be used in UI code because the UI will not respond to redraw events while its thread is stopped."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   518
stringPool[ "userWaitForRequest!ideTitle" ]    = "use of User::WaitForRequest"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   519
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   520
# localised string for Script variablenames
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   521
stringPool[ "variablenames!title" ]       = "Local variables with member/argument names"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   522
stringPool[ "variablenames!description" ] = "Local variable names should be of the form localVariable and not aLocalVar or iLocalVar. Badly-named variables can be misleading and cause maintenance and coding errors."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   523
stringPool[ "variablenames!ideTitle" ]    = "local variables with member/argument names"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   524
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   525
# localised string for Script voidparameter
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   526
stringPool[ "voidparameter!title" ]       = "Void parameter explicitly declared"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   527
stringPool[ "voidparameter!description" ] = "Declaring a void parameter is unnecessary. A function declared as DoSomething(void) may as well be declared as DoSomething(). Void casts are also unnecessary."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   528
stringPool[ "voidparameter!ideTitle" ]    = "void parameter explicitly declared"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   529
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   530
# localised string for Script worryingcomments
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   531
stringPool[ "worryingcomments!title" ]       = "Worrying comments"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   532
stringPool[ "worryingcomments!description" ] = "Typically, exclamation and question marks in comments indicate that something odd is in the code or that it is unfinished or not understood fully."
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   533
stringPool[ "worryingcomments!ideTitle" ]    = "worrying comments"
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
   534