# HG changeset patch # User fturovic # Date 1239732878 18000 # Node ID 4f14af134d0e1568ee5492cfe1ea5c907f7ce9d1 # Parent 75dede17b0d1d628f5aeb6dee13982fc668ab45a added IAD rules to pref page, updated TOC diff -r 75dede17b0d1 -r 4f14af134d0e core/com.nokia.carbide.cpp.codescanner/html/pref_codescanner_03.htm --- a/core/com.nokia.carbide.cpp.codescanner/html/pref_codescanner_03.htm Mon Apr 13 15:32:43 2009 -0500 +++ b/core/com.nokia.carbide.cpp.codescanner/html/pref_codescanner_03.htm Tue Apr 14 13:14:38 2009 -0500 @@ -1,480 +1,492 @@ - -CodeScanner Rules preferences - - - - -
-

CodeScanner Rules preferences

-
-

Use the - CodeScanner Rules page in the Preferences window or the project's properties window to enable or disable the rules used to validate Symbian OS project files. Rules are divided by category and have a severity assigned to them by CodeScanner, but you can use the Edit control to change those settings to better suit your work environment. You can also sort the rules by clicking a column title.

-

-

Figure 1. Rules global settings

- - - - - - - - - - - - - - - - - - - - - - - - - - -
NameFunction
Configure Project Specific Settings...

Click to open the project Properties window and configure CodeScanner for that specific project.

-

NOTE Only visible in the global CodeScanner preference panels. This also applies to the File Filters and General pages

CodeScanner rules

The list of all CodeScanner rules and their active state.

Edit...Opens the currently selected rule in the edit rule dialog where you can set the categroy and severity of the rule.
Enable All Activates all the rules in the CodeScanner rules list.
Disable All Deactivates all the rules in the CodeScanner rules list.
DetailsDisplays helpful advice to help you avoid triggering the selected rule in your source code and projects.
-

 

-

The following table indicates an example of rules listed in the Rules tab and associated error messages that would be generated in the Problems view.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescription

accessArrayElementWithoutCheck

Array element accessed by At() function without checking index is within array range

accessArrayElementWithoutCheck2

Array element accessed by [] without checking range

activestart

Using CActiveScheduler::Start

activestop

Using CActiveScheduler::Stop

arraypassing

Passing arrays by value rather than reference

arrayptrcleanup

Using local CArrayPtr classes without cleanup items

assertdebuginvariant

__ASSERT_DEBUG with User::Invariant

baddefines

Lowercase definition names

baseconstruct

Leaving function called before BaseConstructL()

callActiveObjectWithoutCheckingOrStopping

Active object called without checking whether it is active or canceling it first

changenotification

Using RSAVarChangeNotify to see System Agent changes

cleanup

CleanupStack::Pop(AndDestroy) parameters

commentcode

Commented-out code

connect

Ignoring Connect() return value

ConnectAndDontCloseMemberVariable

Calling Connect() or Open() on a member variable without calling Close() in the destructor

constnames

Badly-named constants

consttdescptr

Const descriptor pointer as argument

controlornull

Accessing return value of ControlOrNull()

ctltargettype

Use of targettype ctl

debugrom

Debug components in ROM

declarename

Use of __DECLARE_NAME

deleteMemberVariable

Member variable deleted incorrectly

destructor

Pointer access in destructors

doubleSemiColon

Use of double semicolon

driveletters

Hard-coded drive letters

eikbuttons

Checks that the R_EIK_BUTTONS_* resources are not being used

eikonenvstatic

Using CEikonEnv::Static

enummembers

Enums with badly-named members

enumnames

Badly-named enums

exportinline

Exporting inline functions

exportpurevirtual

Exporting pure virtual functions

externaldriveletters

Hard-coded external drive letters

foff

Use of _FOFF

forbiddenwords

Use of forbidden words in header files

forgottoputptroncleanupstack

Neglected to put variable on cleanup stack

friend

Use of friends

goto

Use of goto

ifassignments

Assignment in an If statement

ifpreprocessor

Use of #if in .h files

inheritanceorder

Incorrect inheritance order of M and C classes

intleaves

Methods that leave AND return a TInt error

jmp

Use of setjmp and/or longjmp

leave

Leaving functions called in non-leaving functions

LeaveNoError

Leaving with KErrNone

leavingoperators

Leaving functions called in operator functions

LFunctionCantLeave

L-functions that cannot leave

longlines

Overly long lines of code

magicnumbers

Use of magic numbers

mclassdestructor

M class has destructor

memberlc

Assigning LC methods to member variables

membervariablecallld

Calling LD function on member variable

missingcancel

Cancel() not called in active object's destructor

missingcclass

C class not inheriting from another C class

mmpsourcepath

Use of absolute path names in MMP files

multilangrsc

Not using BaflUtils::NearestLanguageFile() when loading a resource file

multipledeclarations

Multiple declarations on one line

multipleinheritance

Non M-class multiple inheritance

mydocs

Hard-coded mydocs directory strings

namespace

Use of namespace

newlreferences

NewL() returning a reference

noleavetrap

TRAP used with no leaving functions

nonconsthbufc

Non-const HBufC* parameter passing

nonconsttdesc

Non-const TDesC& parameter passing

nonleavenew

Use of new without (ELeave)

nonunicodeskins

Non-Unicode skins

null

NULL equality check

open

Ignoring Open() return value

pointertoarrays

Pointer to arrays as members of a C class

pragmadisable

Use of #pragma warning

pragmamessage

Use of #pragma message

pragmaother

Use of #pragma other than warning and message

privateinheritance

Use of private inheritance

pushaddrvar

Pushing address of a variable onto the cleanup stack

pushmember

Pushing data members onto the cleanup stack

readresource

Using ReadResource() instead of ReadResourceL()

resourcenotoncleanupstack

Neglected to put resource objects on cleanup stack

resourcesonheap

Resource objects on the heap

returndescriptoroutofscope

Return descriptor out of scope

rfs

Use of non-pointer/reference RFs

rssnames

Duplicate RSS names

stringliterals

Use of _L string literals

stringsinresourcefiles

Strings in RSS or RA files

struct

Use of struct

tcclasses

T classes inheriting from C classes

tclassdestructor

T class has destructor

todocomments

"To do” comments

trapcleanup

Use of LC function in TRAPs

trapeleave

Trapping new(ELeave)

traprunl

Trapping of (Do)RunL() rather than using RunError()

trspassing

Passing TRequestStatus parameters by value

uids

Duplicate UIDs

uncompressedaif

Uncompressed AIFs in ROM

uncompressedbmp

Uncompressed bitmaps in ROM

unicodesource

Unicode source files

userafter

Use of User::After

userfree

Using User::Free directly

userWaitForRequest

Use of User::WaitForRequest

variablenames

Local variables with member/argument names

voidparameter

Void parameter explicitly declared

worryingcomments

Worrying comments

-

 

-

CodeScanner for projects

-

CodeScanner options can also be set at the project level in the Properties window. Right-click the project and choose Properties, then select the Carbide.c++ > Carbide CodeScanner element in the properties list. Click a tab to view the appropriate page and set its options.

-

CodeScanner options specific to the project:

- - - - - - - - - - - - - -
NameDescription
Enable Project Specific Settings Activate to set project specific CodeScanner settings. By default a project in the workspace uses the global CodeScanner settings unless this option is activated.
Configure Workspace Settings...

Click to open the Preferences window and configure CodeScanner for the workspace.

-

NOTE Only visible in the project CodeScanner property panels.

-

 

-
Other references
- - - - + +CodeScanner Rules preferences + + + + +
+

CodeScanner Rules preferences

+
+

Use the + CodeScanner Rules page in the Preferences window or the project's properties window to enable or disable the rules used to validate Symbian OS project files. Rules are divided by category and have a severity assigned to them by CodeScanner, but you can use the Edit control to change those settings to better suit your work environment. You can also sort the rules by clicking a column title.

+

+

Figure 1. Rules global settings

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameFunction
Configure Project Specific Settings...

Click to open the project Properties window and configure CodeScanner for that specific project.

+

NOTE Only visible in the global CodeScanner preference panels. This also applies to the File Filters and General pages

CodeScanner rules

The list of all CodeScanner rules and their active state.

Edit...Opens the currently selected rule in the edit rule dialog where you can set the categroy and severity of the rule.
Enable All Activates all the rules in the CodeScanner rules list.
Disable All Deactivates all the rules in the CodeScanner rules list.
DetailsDisplays helpful advice to help you avoid triggering the selected rule in your source code and projects.
+

 

+

The following table indicates an example of rules listed in the Rules tab and associated error messages that would be generated in the Problems view.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
accessArrayElementWithoutCheckArray element accessed by At() function without checking index is within array range
accessArrayElementWithoutCheck2Array element accessed by [] without checking range
activestartUsing CActiveScheduler::Start
activestopUsing CActiveScheduler::Stop
arraypassingPassing arrays by value rather than reference
arrayptrcleanupUsing local CArrayPtr classes without cleanup items
assertdebuginvariant__ASSERT_DEBUG with User::Invariant
baddefinesLowercase definition names
baseconstructLeaving function called before BaseConstructL()
callActiveObjectWithoutCheckingOrStoppingActive object called without checking whether it is active or canceling it first
changenotificationUsing RSAVarChangeNotify to see System Agent changes
cleanupCleanupStack::Pop(AndDestroy) parameters
commentcodeCommented-out code
connectIgnoring Connect() return value
ConnectAndDontCloseMemberVariableCalling Connect() or Open() on a member variable without calling Close() in the destructor
constnamesBadly-named constants
consttdescptrConst descriptor pointer as argument
controlornullAccessing return value of ControlOrNull()
crepositorieCheck for Central Repository usage
ctltargettypeUse of targettype ctl
customizableicons Check for customizable icons
debugromDebug components in ROM
declarenameUse of __DECLARE_NAME
deleteMemberVariableMember variable deleted incorrectly
destructorPointer access in destructors
doubleSemiColonUse of double semicolon
drivelettersHard-coded drive letters
eikbuttonsChecks that the R_EIK_BUTTONS_* resources are not being used
eikonenvstaticUsing CEikonEnv::Static
enummembersEnums with badly-named members
enumnamesBadly-named enums
exportinlineExporting inline functions
exportpurevirtualExporting pure virtual functions
externaldrivelettersHard-coded external drive letters
flagsCheck for flag usage
foffUse of _FOFF
forbiddenwordsUse of forbidden words in header files
forgottoputptroncleanupstackNeglected to put variable on cleanup stack
friendUse of friends
gotoUse of goto
ifassignmentsAssignment in an If statement
ifpreprocessorUse of #if in .h files
inheritanceorderIncorrect inheritance order of M and C classes
intleavesMethods that leave AND return a TInt error
jmpUse of setjmp and/or longjmp
leaveLeaving functions called in non-leaving functions
LeaveNoErrorLeaving with KErrNone
leavingoperatorsLeaving functions called in operator functions
LFunctionCantLeaveL-functions that cannot leave
longlinesOverly long lines of code
magicnumbersUse of magic numbers
mclassdestructorM class has destructor
memberlcAssigning LC methods to member variables
membervariablecallldCalling LD function on member variable
missingcancelCancel() not called in active object's destructor
missingcclassC class not inheriting from another C class
mmpsourcepathUse of absolute path names in MMP files
multilangrscNot using BaflUtils::NearestLanguageFile() when loading a resource file
multipledeclarationsMultiple declarations on one line
multipleinheritanceNon M-class multiple inheritance
mydocsHard-coded mydocs directory strings
namespaceUse of namespace
newlreferencesNewL() returning a reference
noleavetrapTRAP used with no leaving functions
nonconsthbufcNon-const HBufC* parameter passing
nonconsttdescNon-const TDesC& parameter passing
nonleavenewUse of new without (ELeave)
nonunicodeskinsNon-Unicode skins
nullNULL equality check
openIgnoring Open() return value
pointertoarraysPointer to arrays as members of a C class
pragmadisableUse of #pragma warning
pragmamessageUse of #pragma message
pragmaotherUse of #pragma other than warning and message
privateinheritanceUse of private inheritance
pushaddrvarPushing address of a variable onto the cleanup stack
pushmemberPushing data members onto the cleanup stack
readresourceUsing ReadResource() instead of ReadResourceL()
resourcenotoncleanupstackNeglected to put resource objects on cleanup stack
resourcesonheapResource objects on the heap
returndescriptoroutofscopeReturn descriptor out of scope
rfsUse of non-pointer/reference RFs
rssnamesDuplicate RSS names
stringliteralsUse of _L string literals
stringsinresourcefilesStrings in RSS or RA files
structUse of struct
tcclassesT classes inheriting from C classes
tclassdestructorT class has destructor
todocomments"To do” comments
trapcleanupUse of LC function in TRAPs
trapeleaveTrapping new(ELeave)
traprunlTrapping of (Do)RunL() rather than using RunError()
trspassingPassing TRequestStatus parameters by value
uidsDuplicate UIDs
uncompressedaifUncompressed AIFs in ROM
uncompressedbmpUncompressed bitmaps in ROM
unicodesourceUnicode source files
userafterUse of User::After
userfreeUsing User::Free directly
userWaitForRequestUse of User::WaitForRequest
variablenamesLocal variables with member/argument names
voidparameterVoid parameter explicitly declared
worryingcommentsWorrying comments
+  

+

CodeScanner for projects

+

CodeScanner options can also be set at the project level in the Properties window. Right-click the project and choose Properties, then select the Carbide.c++ > Carbide CodeScanner element in the properties list. Click a tab to view the appropriate page and set its options.

+

CodeScanner options specific to the project:

+ + + + + + + + + + + + + +
NameDescription
Enable Project Specific Settings Activate to set project specific CodeScanner settings. By default a project in the workspace uses the global CodeScanner settings unless this option is activated.
Configure Workspace Settings...

Click to open the Preferences window and configure CodeScanner for the workspace.

+

NOTE Only visible in the project CodeScanner property panels.

+

 

+
Other references
+ + + + \ No newline at end of file diff -r 75dede17b0d1 -r 4f14af134d0e core/com.nokia.carbide.cpp.codescanner/html/release_notes.htm --- a/core/com.nokia.carbide.cpp.codescanner/html/release_notes.htm Mon Apr 13 15:32:43 2009 -0500 +++ b/core/com.nokia.carbide.cpp.codescanner/html/release_notes.htm Tue Apr 14 13:14:38 2009 -0500 @@ -7,7 +7,7 @@ -

CodeScanner Release Notes v2.1.3

+

CodeScanner Release Notes v2.1.2