SEM002 : Code lines count

The topic describes the SEM002 analysis rule.

Message

Code lines count

Description

Metrics rule – counts lines of code.

How to fix

The rule is only informational.

Scope

The rule has a Batch scope and is applied only on the SQL script.

Parameters

Rule has no parameters.

Remarks

The rule does not need Analysis Context or SQL Connection.

Effort To Fix
Not configured.
Categories

Metrics

Additional Information

There is no additional info for this rule.

Example Test SQL
SQL
 1-- non-ANSI inner join syntax: 
 2SELECT     a.au_id ,
 3           t.titlr e
 4FROM       titles AS t ,
 5           authors AS a ,
 6           titleauthor AS ta
 7WHERE      a.au_id = ta.au_id
 8       AND ta.title_id = t.title_id
 9       AND t.title LIKE 'Example%'
10
11-- ANSI inner join syntax: 
12
13/*
14SELECT     a.au_id ,
15           t.title
16FROM       authors AS a
17INNER JOIN titleauthor AS ta
18ON         a.au_id = ta.au_id
19INNER JOIN titles AS t
20ON         ta.title_id = t.title_id
21WHERE      t.title LIKE 'Example%'*/
22
23
24SELECT     a.au_id ,
25           t.title
26FROM       authors AS a
27INNER JOIN titleauthor AS ta
28ON         a.au_id = ta.au_id
29INNER JOIN titles AS t
30ON         ta.title_id = t.title_id
31WHERE      t.title LIKE 'Example%' -- Ignore

Analysis Results
  Message Line Column
1 SEM002 : CodeLinesCount=16 0 0
See Also

Other Resources