Правки анализаторов
This commit is contained in:
parent
e09a7f4e3e
commit
6e43742b2c
26
.clang-tidy
26
.clang-tidy
@ -1,20 +1,22 @@
|
|||||||
---
|
---
|
||||||
Checks: '-*,
|
Checks: '-*,
|
||||||
bugprone-*,
|
bugprone-*,
|
||||||
|
clang-analyzer-*,
|
||||||
cppcoreguidelines-*,
|
cppcoreguidelines-*,
|
||||||
google-*,
|
google-*,
|
||||||
clang-analyzer-*,
|
llvm-*,
|
||||||
misc-*,
|
misc-*,
|
||||||
modernize-*,
|
modernize-*,
|
||||||
readability-*,
|
readability-*,
|
||||||
performance-*,
|
performance-*,
|
||||||
portability-*,
|
portability-*,
|
||||||
readability-identifier-naming,
|
|
||||||
-cppcoreguidelines-owning-memory,
|
-cppcoreguidelines-owning-memory,
|
||||||
-cppcoreguidelines-avoid-magic-numbers,
|
-cppcoreguidelines-avoid-magic-numbers,
|
||||||
|
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||||
-readability-magic-numbers,
|
-readability-magic-numbers,
|
||||||
-readability-else-after-return,
|
-readability-else-after-return,
|
||||||
-modernize-use-trailing-return-type,
|
-modernize-use-trailing-return-type,
|
||||||
|
-modernize-avoid-c-arrays,
|
||||||
-performance-no-automatic-move,
|
-performance-no-automatic-move,
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -32,9 +34,9 @@ CheckOptions:
|
|||||||
- key: readability-identifier-naming.ClassSuffix
|
- key: readability-identifier-naming.ClassSuffix
|
||||||
value: ''
|
value: ''
|
||||||
- key: readability-identifier-naming.ClassConstantCase
|
- key: readability-identifier-naming.ClassConstantCase
|
||||||
value: UPPER_CASE
|
value: CamelCase
|
||||||
- key: readability-identifier-naming.ClassConstantPrefix
|
- key: readability-identifier-naming.ClassConstantPrefix
|
||||||
value: ''
|
value: 'k_'
|
||||||
- key: readability-identifier-naming.ClassConstantSuffix
|
- key: readability-identifier-naming.ClassConstantSuffix
|
||||||
value: ''
|
value: ''
|
||||||
- key: readability-identifier-naming.ClassMemberCase
|
- key: readability-identifier-naming.ClassMemberCase
|
||||||
@ -50,9 +52,9 @@ CheckOptions:
|
|||||||
- key: readability-identifier-naming.ClassMethodSuffix
|
- key: readability-identifier-naming.ClassMethodSuffix
|
||||||
value: ''
|
value: ''
|
||||||
- key: readability-identifier-naming.ConstantCase
|
- key: readability-identifier-naming.ConstantCase
|
||||||
value: UPPER_CASE
|
value: CamelCase
|
||||||
- key: readability-identifier-naming.ConstantPrefix
|
- key: readability-identifier-naming.ConstantPrefix
|
||||||
value: PRE
|
value: 'k_'
|
||||||
- key: readability-identifier-naming.ConstantSuffix
|
- key: readability-identifier-naming.ConstantSuffix
|
||||||
value: POST
|
value: POST
|
||||||
- key: readability-identifier-naming.ConstantMemberCase
|
- key: readability-identifier-naming.ConstantMemberCase
|
||||||
@ -98,9 +100,9 @@ CheckOptions:
|
|||||||
- key: readability-identifier-naming.EnumSuffix
|
- key: readability-identifier-naming.EnumSuffix
|
||||||
value: ''
|
value: ''
|
||||||
- key: readability-identifier-naming.EnumConstantCase
|
- key: readability-identifier-naming.EnumConstantCase
|
||||||
value: UPPER_CASE
|
value: CamelCase
|
||||||
- key: readability-identifier-naming.EnumConstantPrefix
|
- key: readability-identifier-naming.EnumConstantPrefix
|
||||||
value: ''
|
value: 'k_'
|
||||||
- key: readability-identifier-naming.EnumConstantSuffix
|
- key: readability-identifier-naming.EnumConstantSuffix
|
||||||
value: ''
|
value: ''
|
||||||
- key: readability-identifier-naming.FunctionCase
|
- key: readability-identifier-naming.FunctionCase
|
||||||
@ -110,9 +112,9 @@ CheckOptions:
|
|||||||
- key: readability-identifier-naming.FunctionSuffix
|
- key: readability-identifier-naming.FunctionSuffix
|
||||||
value: ''
|
value: ''
|
||||||
- key: readability-identifier-naming.GlobalConstantCase
|
- key: readability-identifier-naming.GlobalConstantCase
|
||||||
value: UPPER_CASE
|
value: CamelCase
|
||||||
- key: readability-identifier-naming.GlobalConstantPrefix
|
- key: readability-identifier-naming.GlobalConstantPrefix
|
||||||
value: ''
|
value: 'k_'
|
||||||
- key: readability-identifier-naming.GlobalConstantSuffix
|
- key: readability-identifier-naming.GlobalConstantSuffix
|
||||||
value: ''
|
value: ''
|
||||||
- key: readability-identifier-naming.GlobalConstantPointerCase
|
- key: readability-identifier-naming.GlobalConstantPointerCase
|
||||||
@ -148,7 +150,7 @@ CheckOptions:
|
|||||||
- key: readability-identifier-naming.LocalConstantCase
|
- key: readability-identifier-naming.LocalConstantCase
|
||||||
value: camelBack
|
value: camelBack
|
||||||
- key: readability-identifier-naming.LocalConstantPrefix
|
- key: readability-identifier-naming.LocalConstantPrefix
|
||||||
value: ''
|
value: 'k_'
|
||||||
- key: readability-identifier-naming.LocalConstantSuffix
|
- key: readability-identifier-naming.LocalConstantSuffix
|
||||||
value: ''
|
value: ''
|
||||||
- key: readability-identifier-naming.LocalConstantPointerCase
|
- key: readability-identifier-naming.LocalConstantPointerCase
|
||||||
@ -244,7 +246,7 @@ CheckOptions:
|
|||||||
- key: readability-identifier-naming.StaticConstantCase
|
- key: readability-identifier-naming.StaticConstantCase
|
||||||
value: camelBack
|
value: camelBack
|
||||||
- key: readability-identifier-naming.StaticConstantPrefix
|
- key: readability-identifier-naming.StaticConstantPrefix
|
||||||
value: ''
|
value: 'k_'
|
||||||
- key: readability-identifier-naming.StaticConstantSuffix
|
- key: readability-identifier-naming.StaticConstantSuffix
|
||||||
value: ''
|
value: ''
|
||||||
- key: readability-identifier-naming.StaticVariableCase
|
- key: readability-identifier-naming.StaticVariableCase
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
namespace MF = myx::filesystem;
|
namespace MF = myx::filesystem;
|
||||||
|
|
||||||
// Переменные для защиты экземпляра класса MF::Paths
|
// Переменные для защиты экземпляра класса MF::Paths
|
||||||
std::atomic< MF::Paths* > MF::Paths::m_instance;
|
std::atomic< MF::Paths* > MF::Paths::mInstance;
|
||||||
std::mutex MF::Paths::m_mutex;
|
std::mutex MF::Paths::mMutex;
|
||||||
|
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
#include <myx/filesystem/current_executable.hpp>
|
#include <myx/filesystem/current_executable.hpp>
|
||||||
|
|
||||||
#include <paths.h>
|
#include <paths.h>
|
||||||
#include <QString>
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
namespace myx {
|
namespace myx {
|
||||||
|
|
||||||
|
@ -3,17 +3,15 @@
|
|||||||
#include <myx/filesystem/paths.hpp>
|
#include <myx/filesystem/paths.hpp>
|
||||||
|
|
||||||
#include <paths.h>
|
#include <paths.h>
|
||||||
#include <QString>
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
namespace myx {
|
namespace myx {
|
||||||
|
|
||||||
namespace filesystem {
|
namespace filesystem {
|
||||||
|
|
||||||
Paths::Paths()
|
Paths::Paths() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Paths::HierarchyType Paths::getHierarchyType()
|
Paths::HierarchyType Paths::getHierarchyType()
|
||||||
{
|
{
|
||||||
|
@ -83,8 +83,8 @@ class Paths
|
|||||||
|
|
||||||
HierarchyType getHierarchyType();
|
HierarchyType getHierarchyType();
|
||||||
|
|
||||||
static std::atomic< Paths* > m_instance;
|
static std::atomic< Paths* > mInstance;
|
||||||
static std::mutex m_mutex;
|
static std::mutex mMutex;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
@ -93,15 +93,15 @@ public:
|
|||||||
*/
|
*/
|
||||||
static Paths* getInstance()
|
static Paths* getInstance()
|
||||||
{
|
{
|
||||||
Paths* localInstance = m_instance.load( std::memory_order_acquire );
|
Paths* localInstance = mInstance.load( std::memory_order_acquire );
|
||||||
if ( !localInstance )
|
if ( !localInstance )
|
||||||
{
|
{
|
||||||
std::lock_guard< std::mutex > myLock( m_mutex );
|
std::lock_guard< std::mutex > myLock( mMutex );
|
||||||
localInstance = m_instance.load( std::memory_order_relaxed );
|
localInstance = mInstance.load( std::memory_order_relaxed );
|
||||||
if ( !localInstance )
|
if ( !localInstance )
|
||||||
{
|
{
|
||||||
localInstance = new Paths();
|
localInstance = new Paths();
|
||||||
m_instance.store( localInstance, std::memory_order_release );
|
mInstance.store( localInstance, std::memory_order_release );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return( localInstance );
|
return( localInstance );
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include <myx/math/float_cmp_types.hpp>
|
|
||||||
#include <myx/math/almost_equal_ulps.hpp>
|
#include <myx/math/almost_equal_ulps.hpp>
|
||||||
|
#include <myx/math/float_cmp_types.hpp>
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include <myx/math/float_cmp_types.hpp>
|
|
||||||
#include <myx/math/almost_equal_ulps_and_abs.hpp>
|
#include <myx/math/almost_equal_ulps_and_abs.hpp>
|
||||||
|
#include <myx/math/float_cmp_types.hpp>
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#include <myx/base/config.hpp>
|
|
||||||
#include "translators.hpp"
|
#include "translators.hpp"
|
||||||
|
|
||||||
|
#include <myx/base/config.hpp>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QLocale>
|
|
||||||
#include <QLibraryInfo>
|
#include <QLibraryInfo>
|
||||||
|
#include <QLocale>
|
||||||
|
|
||||||
namespace myx {
|
namespace myx {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user