Click or drag to resize

SEM001 : Comment lines count

The topic describes the SEM001 analysis rule.

Message

Comment lines count

Description

Metrics rule - counts lines of comment.

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.

Categories

Metrics

Additional Information

There is no additional info for this rule.

Example Test Script
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

 MessageLineColumn
1SEM001 : CommentLinesCount=1200
See Also

Other Resources