Fixes for new clang-format behavior

This commit is contained in:
Carles Fernandez 2020-11-22 11:05:16 +01:00
parent 96202c3b02
commit e6d802d3e8
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
21 changed files with 42 additions and 2 deletions

View File

@ -44,7 +44,7 @@ jobs:
- name: install dependencies
run: brew install clang-format
- name: run clang-format
run: find . -iname \*.h -o -iname \*.c -o -iname \*.cpp | xargs clang-format -style=file -i
run: find . -iname \*.h -o -iname \*.c -o -iname \*.cc | xargs clang-format -style=file -i
- name: check
run: git diff > clang_format.patch && echo -e "if \n [ -s clang_format.patch ] \nthen \n echo "clang-format not applied:"; echo ""; more clang_format.patch; exit 1 \nfi \n" > detect && chmod +x ./detect && ./detect

View File

@ -29,6 +29,7 @@
#include <iostream> // for cout, cerr
#include <sstream> // for stringstream
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -47,6 +48,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
GeoJSON_Printer::GeoJSON_Printer(const std::string& base_path)
{

View File

@ -29,6 +29,7 @@
#include <iostream> // for cout, cerr
#include <sstream> // for stringstream
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -47,6 +48,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
Gpx_Printer::Gpx_Printer(const std::string& base_path)

View File

@ -31,6 +31,7 @@
#include <sys/stat.h> // for S_IXUSR | S_IRWXG | S_IRWXO
#include <sys/types.h> // for mode_t
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -49,6 +50,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
Kml_Printer::Kml_Printer(const std::string& base_path)

View File

@ -34,6 +34,7 @@
#include <termios.h>
#include <utility>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -52,6 +53,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
Nmea_Printer::Nmea_Printer(const std::string& filename, bool flag_nmea_output_file, bool flag_nmea_tty_port, std::string nmea_dump_devname, const std::string& base_path)

View File

@ -56,6 +56,7 @@
#include <utility>
#include <vector>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -74,6 +75,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
Rinex_Printer::Rinex_Printer(int32_t conf_version, const std::string& base_path, const std::string& base_name)

View File

@ -38,6 +38,8 @@
#include <iostream> // for cout, cerr
#include <termios.h> // for tcgetattr
#include <unistd.h> // for close, write
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -56,6 +58,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format off
Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, const std::string& rtcm_dump_devname, bool time_tag_name, const std::string& base_path)

View File

@ -41,6 +41,7 @@
#include <utility>
#include <vector>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -59,6 +60,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
Rtklib_Solver::Rtklib_Solver(const rtk_t &rtk, int nchannels, const std::string &dump_filename, bool flag_dump_to_file, bool flag_dump_to_mat)

View File

@ -22,6 +22,7 @@
#include <exception> // for exception
#include <fstream> // for ofstream
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -40,6 +41,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
bool gnss_sdr_create_directory(const std::string& foldername)
{

View File

@ -41,6 +41,7 @@
#include <boost/bind/bind.hpp>
#endif
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -59,6 +60,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
hybrid_observables_gs_sptr hybrid_observables_gs_make(const Obs_Conf &conf_)

View File

@ -39,6 +39,7 @@
#include <memory> // for shared_ptr, make_shared
#include <vector>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -57,6 +58,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
#define CRC_ERROR_LIMIT 8

View File

@ -38,6 +38,7 @@
#include <memory> // for shared_ptr, make_shared
#include <vector>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -56,6 +57,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
#define CRC_ERROR_LIMIT 8

View File

@ -44,6 +44,7 @@
#include <iostream> // for cout
#include <memory> // for make_shared
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -62,6 +63,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
#define CRC_ERROR_LIMIT 6

View File

@ -36,6 +36,7 @@
#include <memory> // for shared_ptr, make_shared
#include <vector>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -54,6 +55,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
#define CRC_ERROR_LIMIT 6

View File

@ -36,6 +36,7 @@
#include <memory> // for shared_ptr, make_shared
#include <vector>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -54,6 +55,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
#define CRC_ERROR_LIMIT 6

View File

@ -35,6 +35,7 @@
#include <memory> // for shared_ptr
#include <vector>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -53,7 +54,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
#ifdef COMPILER_HAS_ROTL
#include <bit>

View File

@ -38,6 +38,7 @@
#include <memory> // for shared_ptr, make_shared
#include <vector>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -56,6 +57,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
gps_l2c_telemetry_decoder_gs_sptr
gps_l2c_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf)

View File

@ -37,6 +37,7 @@
#include <memory> // for shared_ptr, make_shared
#include <vector>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -55,6 +56,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
gps_l5_telemetry_decoder_gs_sptr
gps_l5_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf)

View File

@ -24,6 +24,7 @@
#include <matio.h>
#include <array>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -42,6 +43,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
TEST(MatioTest, WriteAndReadDoubles)
{

View File

@ -24,6 +24,7 @@
#include <fstream>
#include <string>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -42,6 +43,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
class NmeaPrinterTest : public ::testing::Test
{

View File

@ -23,6 +23,7 @@
#include <fstream>
#include <string>
// clang-format off
#if HAS_STD_FILESYSTEM
#include <system_error>
namespace errorlib = std;
@ -41,6 +42,7 @@ namespace fs = std::filesystem;
namespace fs = boost::filesystem;
namespace errorlib = boost::system;
#endif
// clang-format on
class RinexPrinterTest : public ::testing::Test
{