mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Fixes for new clang-format behavior
This commit is contained in:
		
							
								
								
									
										2
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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_) | ||||
|   | ||||
| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
|  | ||||
|   | ||||
| @@ -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> | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -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 | ||||
| { | ||||
|   | ||||
| @@ -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 | ||||
| { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez