Skip to content

SEM002 : Code lines count

Metrics rule - counts lines of code.

The rule is only informational.

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

Rule has no parameters.

The rule does not need Analysis Context or SQL Connection.

Not configured.

Metrics

There is no additional info for this rule.

-- non-ANSI inner join syntax:
SELECT a.au_id ,
t.titlr e
FROM titles AS t ,
authors AS a ,
titleauthor AS ta
WHERE a.au_id = ta.au_id
AND ta.title_id = t.title_id
AND t.title LIKE 'Example%'
-- ANSI inner join syntax:
/*
SELECT a.au_id ,
t.title
FROM authors AS a
INNER JOIN titleauthor AS ta
ON a.au_id = ta.au_id
INNER JOIN titles AS t
ON ta.title_id = t.title_id
WHERE t.title LIKE 'Example%'
*/
SELECT a.au_id ,
t.title
FROM authors AS a
INNER JOIN titleauthor AS ta
ON a.au_id = ta.au_id
INNER JOIN titles AS t
ON ta.title_id = t.title_id
WHERE t.title LIKE 'Example%' -- Ignore
  Message Line Column
1 SEM002 : CodeLinesCount=16 0 0

Analysis Rules