Skip to content

SonarQubeCommunity/sonar-lua

Repository files navigation

SonarQube Lua Plugin

Description

This plugin enables analysis of Lua project within SonarQube:

Steps to Analyze a Lua Project

The metrics:

  • Computes the following metrics:

  • LINES_OF_CODE,

  • LINES,

  • FILES,

  • COMMENT_LINES,

  • FUNCTIONS,

  • STATEMENTS,

  • TABLECONSTRUCTORS,

  • COMPLEXITY;

Complexity

The following elements increment the complexity by one:

  • FUNCTION

  • FUNCSTAT

  • WHILE_STATEMENT

  • FOR_STATEMENT

  • IF_STATEMENT

  • DO_STATEMENT

  • REPEAT_STATEMENT

  • ELSEIF_STATEMENT

  • TAILCALL

  • BREAK

  • AND

  • OR

Rules

  • FunctionComplexityCheck.

  • MethodComplexityCheck

  • LocalFunctionComplexityCheck

  • FunctionCallComplexityCheck

  • FileComplexityCheck.

  • TableComplexityCheck

  • FunctionWithTooManyParametersCheck.

  • TableWithTooManyFieldsCheck.

  • NestedControlFlowDepthCheck

  • NestedFunctionsDepthCheck

  • NestedTablesDepthCheck

  • LocalFunctionNameCheck

  • LineLengthCheck

  • TooManyLinesInFileCheck

  • CommentRegularExpressionCheck

  • XPathCheck