Added more clang-tidy checks

Improved GitHub Action to run clang-format as part of clang-tidy

* Simplify clang-tidy workflow
* Added modernize-use-using, modernize-redundant-void-arg, readability-static-accessed-through-instance
* Add nolint for libecl typedefs
This commit is contained in:
Magne Sjaastad
2023-04-14 14:07:45 +02:00
committed by GitHub
parent 457dc9080f
commit 6f6dc80bc6
118 changed files with 220 additions and 225 deletions

View File

@@ -32,7 +32,7 @@
#include <vector>
typedef struct ecl_file_struct ecl_file_type;
using ecl_file_type = struct ecl_file_struct;
class RifEclipseRestartDataAccess;
class QByteArray;

View File

@@ -39,10 +39,12 @@ class QDateTime;
struct RigWellResultPoint;
// NOLINTBEGIN(modernize-use-using)
typedef struct ecl_grid_struct ecl_grid_type;
typedef struct ecl_file_struct ecl_file_type;
typedef struct well_conn_struct well_conn_type;
typedef struct well_segment_struct well_segment_type;
// NOLINTEND(modernize-use-using)
//==================================================================================================
//

View File

@@ -62,8 +62,10 @@ private:
int indexFromAddress( const RifEclipseRftAddress& rftAddress ) const;
private:
// NOLINTBEGIN(modernize-use-using)
// Taken from ecl_rft_file.h and ecl_rft_node.h
typedef struct ecl_rft_file_struct ecl_rft_file_type;
// NOLINTEND(modernize-use-using)
QString m_fileName;
ecl_rft_file_type* m_ecl_rft_file;

View File

@@ -87,8 +87,8 @@ public:
void load();
private:
typedef std::pair<const QString, WellObservationSet> WellObservationPair;
typedef std::map<QString, WellObservationSet> WellObservationMap;
using WellObservationPair = std::pair<const QString, WellObservationSet>;
using WellObservationMap = std::map<QString, WellObservationSet>;
WellObservationMap loadWellDates( QDir& dir, QString* errorMsg );
static bool readTxtFile( const QString& txtFileName, QString* errorMsg, WellObservationSet* wellObservationSet );