Represents the results of an audit for a specific file.
More...
#include <audit_result.hpp>
|
| | AuditResult (const QString &fileName) |
| | Constructs an AuditResult object for a specific file.
|
| |
| void | addIssue (const QString &issue) |
| | Adds an issue to the audit result.
|
| |
| void | setLine (int lineNumber) |
| | Sets the line number for this audit result.
|
| |
| void | setColumn (int columnNumber) |
| | Sets the column number for this audit result.
|
| |
| void | setEndLine (int endLineNumber) |
| | Sets the end line number for this audit result.
|
| |
| void | setEndColumn (int endColumnNumber) |
| | Sets the end column number for this audit result.
|
| |
| void | setFilePath (const QString &path) |
| | Sets the file path for this audit result.
|
| |
| QString | getSummary () const |
| | Generates a summary of the audit result.
|
| |
| QString | getFileName () const |
| | Retrieves the name of the file associated with this audit result.
|
| |
| QString | getFilePath () const |
| | Retrieves the full file path associated with this audit result.
|
| |
| QList< QString > | getIssues () const |
| | Retrieves the list of issues identified during the audit.
|
| |
| int | getLine () const |
| |
| int | getColumn () const |
| |
| int | getEndLine () const |
| |
| int | getEndColumn () const |
| |
| QString | getMessage () const |
| |
| QString | getRuleId () const |
| |
| void | setRuleId (const QString &id) |
| | Sets the rule ID for this audit result.
|
| |
| bool | hasLocationInfo () const |
| |
Represents the results of an audit for a specific file.
The AuditResult class stores the file name and a list of issues identified during the audit process. It provides methods to add issues and retrieve a summary of the results.
◆ AuditResult()
| AuditResult::AuditResult |
( |
const QString & |
fileName | ) |
|
Constructs an AuditResult object for a specific file.
- Parameters
-
| fileName | The name of the file being audited. |
◆ addIssue()
| void AuditResult::addIssue |
( |
const QString & |
issue | ) |
|
Adds an issue to the audit result.
- Parameters
-
| issue | A description of the issue identified during the audit. |
◆ getColumn()
| int AuditResult::getColumn |
( |
| ) |
const |
|
inline |
◆ getEndColumn()
| int AuditResult::getEndColumn |
( |
| ) |
const |
|
inline |
◆ getEndLine()
| int AuditResult::getEndLine |
( |
| ) |
const |
|
inline |
◆ getFileName()
| QString AuditResult::getFileName |
( |
| ) |
const |
Retrieves the name of the file associated with this audit result.
- Returns
- The file name as a QString.
◆ getFilePath()
| QString AuditResult::getFilePath |
( |
| ) |
const |
Retrieves the full file path associated with this audit result.
- Returns
- The file path as a QString.
◆ getIssues()
| QList< QString > AuditResult::getIssues |
( |
| ) |
const |
Retrieves the list of issues identified during the audit.
- Returns
- A QList of QStrings, each representing an issue.
◆ getLine()
| int AuditResult::getLine |
( |
| ) |
const |
|
inline |
◆ getMessage()
| QString AuditResult::getMessage |
( |
| ) |
const |
|
inline |
◆ getRuleId()
| QString AuditResult::getRuleId |
( |
| ) |
const |
|
inline |
◆ getSummary()
| QString AuditResult::getSummary |
( |
| ) |
const |
Generates a summary of the audit result.
This method constructs a summary string containing the file name and the number of issues found during the audit.
- Returns
- A QString containing the summary in the format: "File: <fileName>\nIssues found: <number_of_issues>"
◆ hasLocationInfo()
| bool AuditResult::hasLocationInfo |
( |
| ) |
const |
|
inline |
◆ setColumn()
| void AuditResult::setColumn |
( |
int |
columnNumber | ) |
|
Sets the column number for this audit result.
- Parameters
-
| columnNumber | The column number where the issue was found. |
◆ setEndColumn()
| void AuditResult::setEndColumn |
( |
int |
endColumnNumber | ) |
|
Sets the end column number for this audit result.
- Parameters
-
| endColumnNumber | The end column number of the issue. |
◆ setEndLine()
| void AuditResult::setEndLine |
( |
int |
endLineNumber | ) |
|
Sets the end line number for this audit result.
- Parameters
-
| endLineNumber | The end line number of the issue. |
◆ setFilePath()
| void AuditResult::setFilePath |
( |
const QString & |
path | ) |
|
Sets the file path for this audit result.
- Parameters
-
◆ setLine()
| void AuditResult::setLine |
( |
int |
lineNumber | ) |
|
Sets the line number for this audit result.
- Parameters
-
| lineNumber | The line number where the issue was found. |
◆ setRuleId()
| void AuditResult::setRuleId |
( |
const QString & |
id | ) |
|
Sets the rule ID for this audit result.
- Parameters
-
| id | The rule ID that triggered this result. |
◆ column
◆ endColumn
| int AuditResult::endColumn |
|
private |
◆ endLine
◆ fileName
| QString AuditResult::fileName |
|
private |
◆ filePath
| QString AuditResult::filePath |
|
private |
◆ issues
| QList<QString> AuditResult::issues |
|
private |
◆ line
◆ message
| QString AuditResult::message |
|
private |
◆ ruleId
| QString AuditResult::ruleId |
|
private |
The documentation for this class was generated from the following files: