analyzers changed some suppressions to NOLINT()

This commit is contained in:
silverqx
2024-09-04 08:36:10 +02:00
parent 6136db04dd
commit 7bd07bee94
9 changed files with 15 additions and 30 deletions
+1 -2
View File
@@ -20,8 +20,7 @@ TINYORM_BEGIN_COMMON_NAMESPACE
namespace Orm
{
// NOLINTNEXTLINE(google-build-using-namespace)
using namespace Orm::Constants;
using namespace Orm::Constants; // NOLINT(google-build-using-namespace)
class DatabaseConnection;
+1 -2
View File
@@ -55,8 +55,7 @@ namespace Orm::Query
/* public */
// NOLINTNEXTLINE(modernize-pass-by-value)
Expression::Expression(const QVariant &value)
Expression::Expression(const QVariant &value) // NOLINT(modernize-pass-by-value)
: m_value(value)
{}
@@ -73,8 +73,7 @@ namespace Constants
} // namespace Constants
// NOLINTNEXTLINE(google-build-using-namespace)
using namespace Orm::SchemaNs::Constants;
using namespace Orm::SchemaNs::Constants; // NOLINT(google-build-using-namespace)
} // namespace Orm::SchemaNs
@@ -76,8 +76,7 @@ namespace Constants
} // namespace Constants
// NOLINTNEXTLINE(google-build-using-namespace)
using namespace Orm::SchemaNs::Constants;
using namespace Orm::SchemaNs::Constants; // NOLINT(google-build-using-namespace)
} // namespace Orm::SchemaNs
+4 -8
View File
@@ -49,8 +49,7 @@ const QString &BaseGrammar::getTimeFormat() const
return cachedFormat;
}
// NOLINTNEXTLINE(misc-no-recursion)
QString BaseGrammar::wrap(const QString &value, const bool prefixAlias) const
QString BaseGrammar::wrap(const QString &value, const bool prefixAlias) const // NOLINT(misc-no-recursion)
{
/* If the value being wrapped has a column alias we will need to separate out
the pieces so we can wrap each of the segments of the expression on its
@@ -75,8 +74,7 @@ QString BaseGrammar::wrap(const Column &value) const
: wrap(std::get<QString>(value));
}
// NOLINTNEXTLINE(misc-no-recursion)
QString BaseGrammar::wrapTable(const QString &table) const
QString BaseGrammar::wrapTable(const QString &table) const // NOLINT(misc-no-recursion)
{
return wrap(NOSPACE.arg(m_tablePrefix, table), true);
}
@@ -151,8 +149,7 @@ QString BaseGrammar::parameter(const QVariant &value)
: QChar::fromLatin1('?');
}
// NOLINTNEXTLINE(misc-no-recursion)
QString BaseGrammar::wrapAliasedValue(const QString &value, const bool prefixAlias) const
QString BaseGrammar::wrapAliasedValue(const QString &value, const bool prefixAlias) const // NOLINT(misc-no-recursion)
{
auto segments = getSegmentsFromAlias(value);
@@ -174,8 +171,7 @@ QString BaseGrammar::wrapValue(QString value) const
return TMPL_DQUOTES.arg(value.replace(QUOTE, u"\"\""_s));
}
// NOLINTNEXTLINE(misc-no-recursion)
QString BaseGrammar::wrapSegments(QStringList segments) const
QString BaseGrammar::wrapSegments(QStringList segments) const // NOLINT(misc-no-recursion)
{
const auto size = segments.size();
// eg. table_name.column is qualified
+1 -2
View File
@@ -35,8 +35,7 @@ SqlError::SqlError(const QString &message, QSqlError &&error)
/* protected */
// NOLINTNEXTLINE(modernize-pass-by-value)
SqlError::SqlError(const QString &message, const QSqlError &error, const int /*unused*/)
SqlError::SqlError(const QString &message, const QSqlError &error, const int /*unused*/) // NOLINT(modernize-pass-by-value)
: RuntimeError(message.toUtf8().constData())
, m_sqlError(error)
{}
+4 -8
View File
@@ -5,29 +5,25 @@ TINYORM_BEGIN_COMMON_NAMESPACE
namespace Orm::Query
{
// NOLINTNEXTLINE(modernize-pass-by-value)
JoinClause::JoinClause(const Builder &query, const QString &type, const QString &table)
JoinClause::JoinClause(const Builder &query, const QString &type, const QString &table) // NOLINT(modernize-pass-by-value)
: Builder(query.getConnectionShared(), query.getGrammarShared())
, m_type(type)
, m_table(table)
{}
// NOLINTNEXTLINE(modernize-pass-by-value)
JoinClause::JoinClause(const Builder &query, const QString &type, const Expression &table)
JoinClause::JoinClause(const Builder &query, const QString &type, const Expression &table) // NOLINT(modernize-pass-by-value)
: Builder(query.getConnectionShared(), query.getGrammarShared())
, m_type(type)
, m_table(table)
{}
// NOLINTNEXTLINE(modernize-pass-by-value)
JoinClause::JoinClause(const Builder &query, const QString &type, Expression &&table)
JoinClause::JoinClause(const Builder &query, const QString &type, Expression &&table) // NOLINT(modernize-pass-by-value)
: Builder(query.getConnectionShared(), query.getGrammarShared())
, m_type(type)
, m_table(std::move(table))
{}
// NOLINTNEXTLINE(modernize-pass-by-value)
JoinClause::JoinClause(const Builder &query, const QString &type, const JoinTable &table)
JoinClause::JoinClause(const Builder &query, const QString &type, const JoinTable &table) // NOLINT(modernize-pass-by-value)
: Builder(query.getConnectionShared(), query.getGrammarShared())
, m_type(type)
, m_table(table)
@@ -483,8 +483,7 @@ tst_Versions::getExeVersionString(const QString &fileName)
}
// GetFileVersionInfo
// NOLINTNEXTLINE(modernize-avoid-c-arrays)
auto lpData = std::make_unique<BYTE[]>(dwLen);
auto lpData = std::make_unique<BYTE[]>(dwLen); // NOLINT(modernize-avoid-c-arrays)
if (!GetFileVersionInfo(fileName.toStdWString().c_str(), 0, dwLen,
static_cast<LPVOID>(lpData.get()))) {
qWarning() << "Error in GetFileVersionInfo().";
@@ -25,8 +25,7 @@ namespace Models
{{ usingsSection }}
{{ forwardsSection }}
// NOLINTNEXTLINE(misc-no-recursion)
class {{ class }} final : public Model<{{ class }}{{ relationsList }}{{ pivotsList }}>
class {{ class }} final : public Model<{{ class }}{{ relationsList }}{{ pivotsList }}> // NOLINT(misc-no-recursion)
{
friend Model;
using Model::Model;{{ publicSection }}{{ protectedSection }}{{ privateSection }}