CoreTrace Qt IDE 1.0
The CoreTrace Text editor
 
Loading...
Searching...
No Matches
AuditResult Class Reference

Represents the results of an audit for a specific file. More...

#include <audit_result.hpp>

Public Member Functions

 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
 

Private Attributes

QString fileName
 
QString filePath
 
QString ruleId
 
QList< QString > issues
 
int line
 
int column
 
int endLine
 
int endColumn
 
QString message
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AuditResult()

AuditResult::AuditResult ( const QString &  fileName)

Constructs an AuditResult object for a specific file.

Parameters
fileNameThe name of the file being audited.

Member Function Documentation

◆ addIssue()

void AuditResult::addIssue ( const QString &  issue)

Adds an issue to the audit result.

Parameters
issueA 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
columnNumberThe column number where the issue was found.

◆ setEndColumn()

void AuditResult::setEndColumn ( int  endColumnNumber)

Sets the end column number for this audit result.

Parameters
endColumnNumberThe end column number of the issue.

◆ setEndLine()

void AuditResult::setEndLine ( int  endLineNumber)

Sets the end line number for this audit result.

Parameters
endLineNumberThe end line number of the issue.

◆ setFilePath()

void AuditResult::setFilePath ( const QString &  path)

Sets the file path for this audit result.

Parameters
pathThe full file path.

◆ setLine()

void AuditResult::setLine ( int  lineNumber)

Sets the line number for this audit result.

Parameters
lineNumberThe line number where the issue was found.

◆ setRuleId()

void AuditResult::setRuleId ( const QString &  id)

Sets the rule ID for this audit result.

Parameters
idThe rule ID that triggered this result.

Member Data Documentation

◆ column

int AuditResult::column
private

◆ endColumn

int AuditResult::endColumn
private

◆ endLine

int AuditResult::endLine
private

◆ fileName

QString AuditResult::fileName
private

◆ filePath

QString AuditResult::filePath
private

◆ issues

QList<QString> AuditResult::issues
private

◆ line

int AuditResult::line
private

◆ message

QString AuditResult::message
private

◆ ruleId

QString AuditResult::ruleId
private

The documentation for this class was generated from the following files: