Skip to content

Commit 3e58e62

Browse files
author
Pavel Siska
committed
editorconfig - fix editor config warnings
1 parent 5ed4f57 commit 3e58e62

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+942
-945
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
- name: Check out repository code
2525
uses: actions/checkout@v4
2626
- name: Check editorconfig
27-
run: ec --exclude .git
27+
run: ec --exclude .git --exclude tests/functional/inputs

CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ option(ENABLE_RPMBUILD "Enable build of RPM package"
2424
option(ENABLE_TESTS "Build tests (make test)" OFF)
2525

2626
if(ENABLE_MILISECONDS_TIMESTAMP)
27-
add_compile_definitions(IPXP_TS_MSEC)
27+
add_compile_definitions(IPXP_TS_MSEC)
2828
endif()
2929

3030
if(ENABLE_NEMEA)
@@ -57,12 +57,12 @@ add_subdirectory(pkg)
5757
add_subdirectory(init)
5858

5959
if (ENABLE_TESTS)
60-
if (NOT ENABLE_NEMEA OR NOT ENABLE_OUTPUT_UNIREC OR NOT ENABLE_INPUT_PCAP)
61-
message(FATAL_ERROR
62-
"ENABLE_TESTS requires ENABLE_NEMEA, "
63-
"ENABLE_INPUT_PCAP and ENABLE_OUTPUT_UNIREC to be enabled."
64-
)
65-
endif()
60+
if (NOT ENABLE_NEMEA OR NOT ENABLE_OUTPUT_UNIREC OR NOT ENABLE_INPUT_PCAP)
61+
message(FATAL_ERROR
62+
"ENABLE_TESTS requires ENABLE_NEMEA, "
63+
"ENABLE_INPUT_PCAP and ENABLE_OUTPUT_UNIREC to be enabled."
64+
)
65+
endif()
6666
enable_testing()
67-
add_subdirectory(tests)
67+
add_subdirectory(tests)
6868
endif()

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Here are the examples of various plugins usage:
7171
`./ipfixprobe -i 'dpdk-ring;r=rx_ipfixprobe_0;e= --proc-type=secondary' -i 'dpdk-ring;r=rx_ipfixprobe_1' -i 'dpdk-ring;r=rx_ipfixprobe_2' -i 'dpdk-ring;r=rx_ipfixprobe_3' -o 'text'`
7272
```
7373

74-
## Build
74+
## Build
7575

7676
### Requirements
7777
- libatomic
@@ -129,7 +129,7 @@ To install ipfixprobe with NEMEA dependency from binary RPM packages, it is poss
129129

130130
## Telemetry
131131

132-
`ipfixprobe` exports statistics and other diagnostic information through a telemetry interface based on appFs library, which leverages the fuse3 library (filesystem in userspace) to allow telemetry data to be accessed and manipulated
132+
`ipfixprobe` exports statistics and other diagnostic information through a telemetry interface based on appFs library, which leverages the fuse3 library (filesystem in userspace) to allow telemetry data to be accessed and manipulated
133133
through standard filesystem operations.
134134

135135
```
@@ -264,4 +264,3 @@ Turn off message buffering using `buffer=off` option and set `timeout=WAIT` on o
264264
```
265265
./ipfixprobe -i 'pcap;file=traffic.pcap' -o 'unirec;i=u:out:timeout=WAIT:buffer=off'
266266
```
267-

cmake/dependencies.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ find_package(OpenSSL REQUIRED)
1010
if (ENABLE_INPUT_PCAP)
1111
pkg_check_modules(PCAP REQUIRED libpcap)
1212
endif()
13-
13+
1414
if (ENABLE_INPUT_DPDK)
1515
pkg_check_modules(DPDK REQUIRED libdpdk)
1616
endif()

cmake/modules/FindAtomic.cmake

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66
#
77

88
find_library(ATOMIC_LIBRARY
9-
NAMES atomic libatomic.so.1
10-
HINTS ${ATOMIC_ROOT}
11-
${CMAKE_INSTALL_LIBDIR})
9+
NAMES atomic libatomic.so.1
10+
HINTS ${ATOMIC_ROOT}
11+
${CMAKE_INSTALL_LIBDIR})
1212

1313
include(FindPackageHandleStandardArgs)
1414
find_package_handle_standard_args (Atomic
15-
REQUIRED_VARS ATOMIC_LIBRARY
15+
REQUIRED_VARS ATOMIC_LIBRARY
1616
)
1717

1818
if (ATOMIC_FOUND AND NOT TARGET atomic::atomic)
19-
add_library(atomic::atomic STATIC IMPORTED)
20-
set_target_properties(atomic::atomic PROPERTIES
21-
IMPORTED_LOCATION "${ATOMIC_LIBRARY}"
22-
INTERFACE_INCLUDE_DIRECTORIES "${ATOMIC_INCLUDE_DIR}")
23-
target_compile_definitions(atomic::atomic INTERFACE UNWIND_FOUND)
19+
add_library(atomic::atomic STATIC IMPORTED)
20+
set_target_properties(atomic::atomic PROPERTIES
21+
IMPORTED_LOCATION "${ATOMIC_LIBRARY}"
22+
INTERFACE_INCLUDE_DIRECTORIES "${ATOMIC_INCLUDE_DIR}")
23+
target_compile_definitions(atomic::atomic INTERFACE UNWIND_FOUND)
2424
else()
25-
message(CRITICAL "Notice: atomic not found")
26-
add_library(atomic::atomic INTERFACE IMPORTED)
25+
message(CRITICAL "Notice: atomic not found")
26+
add_library(atomic::atomic INTERFACE IMPORTED)
2727
endif()
2828

2929
unset(ATOMIC_LIBRARY)

cmake/modules/FindLZ4.cmake

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Use this module by invoking find_package with the form::
1111
1212
.. code-block:: cmake
1313
14-
find_package(LZ4
15-
[version] # Minimum version e.g. 1.8.0
16-
[REQUIRED] # Fail with error if LZ4 is not found
17-
)
14+
find_package(LZ4
15+
[version] # Minimum version e.g. 1.8.0
16+
[REQUIRED] # Fail with error if LZ4 is not found
17+
)
1818
1919
Imported targets
2020
^^^^^^^^^^^^^^^^
@@ -23,26 +23,26 @@ This module defines the following :prop_tgt:`IMPORTED` targets:
2323
2424
.. variable:: lz4::lz4
2525
26-
Imported target for using the LZ4 library, if found.
26+
Imported target for using the LZ4 library, if found.
2727
2828
Result variables
2929
^^^^^^^^^^^^^^^^
3030
3131
.. variable:: LZ4_FOUND
3232
33-
Set to true if LZ4 library found, otherwise false or undefined.
33+
Set to true if LZ4 library found, otherwise false or undefined.
3434
3535
.. variable:: LZ4_INCLUDE_DIRS
3636
37-
Paths to include directories listed in one variable for use by LZ4 client.
37+
Paths to include directories listed in one variable for use by LZ4 client.
3838
3939
.. variable:: LZ4_LIBRARIES
4040
41-
Paths to libraries to linked against to use LZ4.
41+
Paths to libraries to linked against to use LZ4.
4242
4343
.. variable:: LZ4_VERSION
4444
45-
The version string of LZ4 found.
45+
The version string of LZ4 found.
4646
4747
Cache variables
4848
^^^^^^^^^^^^^^^
@@ -52,11 +52,11 @@ reads hints about search locations from the following variables::
5252
5353
.. variable:: LZ4_INCLUDE_DIR
5454
55-
Path to LZ4 include directory with ``lz4.h`` header.
55+
Path to LZ4 include directory with ``lz4.h`` header.
5656
5757
.. variable:: LZ4_LIBRARY
5858
59-
Path to LZ4 library to be linked.
59+
Path to LZ4 library to be linked.
6060
6161
NOTE: The variables above should not usually be used in CMakeLists.txt files!
6262
@@ -65,35 +65,35 @@ NOTE: The variables above should not usually be used in CMakeLists.txt files!
6565
### Find library ##############################################################
6666

6767
if(NOT LZ4_LIBRARY)
68-
find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
69-
find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
68+
find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
69+
find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
7070

71-
include(SelectLibraryConfigurations)
72-
select_library_configurations(LZ4)
71+
include(SelectLibraryConfigurations)
72+
select_library_configurations(LZ4)
7373
else()
74-
file(TO_CMAKE_PATH "${LZ4_LIBRARY}" LZ4_LIBRARY)
74+
file(TO_CMAKE_PATH "${LZ4_LIBRARY}" LZ4_LIBRARY)
7575
endif()
7676

7777
### Find include directory ####################################################
7878
find_path(LZ4_INCLUDE_DIR NAMES lz4.h)
7979

8080
if(LZ4_INCLUDE_DIR AND EXISTS "${LZ4_INCLUDE_DIR}/lz4.h")
81-
file(STRINGS "${LZ4_INCLUDE_DIR}/lz4.h" _lz4_h_contents
82-
REGEX "#define LZ4_VERSION_[A-Z]+[ ]+[0-9]+")
83-
string(REGEX REPLACE "#define LZ4_VERSION_MAJOR[ ]+([0-9]+).+" "\\1"
84-
LZ4_VERSION_MAJOR "${_lz4_h_contents}")
85-
string(REGEX REPLACE ".+#define LZ4_VERSION_MINOR[ ]+([0-9]+).+" "\\1"
86-
LZ4_VERSION_MINOR "${_lz4_h_contents}")
87-
string(REGEX REPLACE ".+#define LZ4_VERSION_RELEASE[ ]+([0-9]+).*" "\\1"
88-
LZ4_VERSION_RELEASE "${_lz4_h_contents}")
89-
set(LZ4_VERSION "${LZ4_VERSION_MAJOR}.${LZ4_VERSION_MINOR}.${LZ4_VERSION_RELEASE}")
90-
unset(_lz4_h_contents)
81+
file(STRINGS "${LZ4_INCLUDE_DIR}/lz4.h" _lz4_h_contents
82+
REGEX "#define LZ4_VERSION_[A-Z]+[ ]+[0-9]+")
83+
string(REGEX REPLACE "#define LZ4_VERSION_MAJOR[ ]+([0-9]+).+" "\\1"
84+
LZ4_VERSION_MAJOR "${_lz4_h_contents}")
85+
string(REGEX REPLACE ".+#define LZ4_VERSION_MINOR[ ]+([0-9]+).+" "\\1"
86+
LZ4_VERSION_MINOR "${_lz4_h_contents}")
87+
string(REGEX REPLACE ".+#define LZ4_VERSION_RELEASE[ ]+([0-9]+).*" "\\1"
88+
LZ4_VERSION_RELEASE "${_lz4_h_contents}")
89+
set(LZ4_VERSION "${LZ4_VERSION_MAJOR}.${LZ4_VERSION_MINOR}.${LZ4_VERSION_RELEASE}")
90+
unset(_lz4_h_contents)
9191
endif()
9292

9393
### Set result variables ######################################################
9494
include(FindPackageHandleStandardArgs)
9595
find_package_handle_standard_args(LZ4 DEFAULT_MSG
96-
LZ4_LIBRARY LZ4_INCLUDE_DIR LZ4_VERSION)
96+
LZ4_LIBRARY LZ4_INCLUDE_DIR LZ4_VERSION)
9797

9898
mark_as_advanced(LZ4_INCLUDE_DIR LZ4_LIBRARY)
9999

@@ -102,29 +102,29 @@ set(LZ4_INCLUDE_DIRS ${LZ4_INCLUDE_DIR})
102102

103103
### Import targets ############################################################
104104
if(LZ4_FOUND)
105-
if(NOT TARGET lz4::lz4)
106-
add_library(lz4::lz4 UNKNOWN IMPORTED)
107-
set_target_properties(lz4::lz4 PROPERTIES
108-
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
109-
INTERFACE_INCLUDE_DIRECTORIES "${LZ4_INCLUDE_DIR}")
110-
111-
if(LZ4_LIBRARY_RELEASE)
112-
set_property(TARGET lz4::lz4 APPEND PROPERTY
113-
IMPORTED_CONFIGURATIONS RELEASE)
114-
set_target_properties(lz4::lz4 PROPERTIES
115-
IMPORTED_LOCATION_RELEASE "${LZ4_LIBRARY_RELEASE}")
116-
endif()
117-
118-
if(LZ4_LIBRARY_DEBUG)
119-
set_property(TARGET lz4::lz4 APPEND PROPERTY
120-
IMPORTED_CONFIGURATIONS DEBUG)
121-
set_target_properties(lz4::lz4 PROPERTIES
122-
IMPORTED_LOCATION_DEBUG "${LZ4_LIBRARY_DEBUG}")
123-
endif()
124-
125-
if(NOT LZ4_LIBRARY_RELEASE AND NOT LZ4_LIBRARY_DEBUG)
126-
set_property(TARGET lz4::lz4 APPEND PROPERTY
127-
IMPORTED_LOCATION "${LZ4_LIBRARY}")
128-
endif()
129-
endif()
105+
if(NOT TARGET lz4::lz4)
106+
add_library(lz4::lz4 UNKNOWN IMPORTED)
107+
set_target_properties(lz4::lz4 PROPERTIES
108+
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
109+
INTERFACE_INCLUDE_DIRECTORIES "${LZ4_INCLUDE_DIR}")
110+
111+
if(LZ4_LIBRARY_RELEASE)
112+
set_property(TARGET lz4::lz4 APPEND PROPERTY
113+
IMPORTED_CONFIGURATIONS RELEASE)
114+
set_target_properties(lz4::lz4 PROPERTIES
115+
IMPORTED_LOCATION_RELEASE "${LZ4_LIBRARY_RELEASE}")
116+
endif()
117+
118+
if(LZ4_LIBRARY_DEBUG)
119+
set_property(TARGET lz4::lz4 APPEND PROPERTY
120+
IMPORTED_CONFIGURATIONS DEBUG)
121+
set_target_properties(lz4::lz4 PROPERTIES
122+
IMPORTED_LOCATION_DEBUG "${LZ4_LIBRARY_DEBUG}")
123+
endif()
124+
125+
if(NOT LZ4_LIBRARY_RELEASE AND NOT LZ4_LIBRARY_DEBUG)
126+
set_property(TARGET lz4::lz4 APPEND PROPERTY
127+
IMPORTED_LOCATION "${LZ4_LIBRARY}")
128+
endif()
129+
endif()
130130
endif()

cmake/modules/FindNUMA.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ find_path(NUMA_INCLUDE_DIR numa.h)
1717

1818
include(FindPackageHandleStandardArgs)
1919
find_package_handle_standard_args(
20-
NUMA
21-
REQUIRED_VARS NUMA_INCLUDE_DIR NUMA_LIBRARY
22-
FAIL_MESSAGE "NUMA not found! Try to install numactl-devel package.")
20+
NUMA
21+
REQUIRED_VARS NUMA_INCLUDE_DIR NUMA_LIBRARY
22+
FAIL_MESSAGE "NUMA not found! Try to install numactl-devel package.")
2323

2424
if(NUMA_FOUND AND NOT TARGET numa::numa)
25-
add_library(numa::numa INTERFACE IMPORTED)
26-
set_property(TARGET numa::numa PROPERTY INTERFACE_LINK_LIBRARIES "${NUMA_LIBRARY}")
27-
set_property(TARGET numa::numa PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${NUMA_INCLUDE_DIR}")
25+
add_library(numa::numa INTERFACE IMPORTED)
26+
set_property(TARGET numa::numa PROPERTY INTERFACE_LINK_LIBRARIES "${NUMA_LIBRARY}")
27+
set_property(TARGET numa::numa PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${NUMA_INCLUDE_DIR}")
2828
endif()

cmake/modules/FindUnwind.cmake

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
# Once done this will define
33
#
44
# UNWIND_FOUND - system has libunwind
5-
# unwind::unwind - cmake target
5+
# unwind::unwind - cmake target
66

77
find_package(PkgConfig QUIET)
88
if (PKG_CONFIG_FOUND)
99
pkg_check_modules(PC_UNWIND QUIET libunwind)
1010
endif()
1111

12-
find_path (UNWIND_INCLUDE_DIR
13-
NAMES unwind.h libunwind.h
14-
HINTS ${UNWIND_ROOT} ${PC_UNWIND_INCLUDEDIR} ${PC_UNWIND_INCLUDE_DIRS}
15-
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR}
12+
find_path (UNWIND_INCLUDE_DIR
13+
NAMES unwind.h libunwind.h
14+
HINTS ${UNWIND_ROOT} ${PC_UNWIND_INCLUDEDIR} ${PC_UNWIND_INCLUDE_DIRS}
15+
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR}
1616
)
1717

18-
find_library (UNWIND_LIBRARY
19-
NAMES unwind
20-
HINTS ${UNWIND_ROOT} ${PC_UNWIND_LIBDIR} ${PC_UNWIND_LIBRARY_DIRS}
21-
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR}
18+
find_library (UNWIND_LIBRARY
19+
NAMES unwind
20+
HINTS ${UNWIND_ROOT} ${PC_UNWIND_LIBDIR} ${PC_UNWIND_LIBRARY_DIRS}
21+
PATH_SUFFIXES ${CMAKE_INSTALL_LIBDIR}
2222
)
2323

2424
mark_as_advanced (UNWIND_INCLUDE_DIR UNWIND_LIBRARY)
@@ -27,18 +27,18 @@ include (FindPackageHandleStandardArgs)
2727
# handle the QUIETLY and REQUIRED arguments and set Unwind_FOUND to TRUE
2828
# if all listed variables are TRUE
2929
find_package_handle_standard_args (Unwind
30-
REQUIRED_VARS UNWIND_INCLUDE_DIR UNWIND_LIBRARY
30+
REQUIRED_VARS UNWIND_INCLUDE_DIR UNWIND_LIBRARY
3131
)
3232

3333
if (UNWIND_FOUND AND NOT TARGET unwind::unwind)
34-
add_library(unwind::unwind STATIC IMPORTED)
35-
set_target_properties(unwind::unwind PROPERTIES
36-
IMPORTED_LOCATION "${UNWIND_LIBRARY}"
37-
INTERFACE_INCLUDE_DIRECTORIES "${UNWIND_INCLUDE_DIR}")
38-
target_compile_definitions(unwind::unwind INTERFACE UNWIND_FOUND)
34+
add_library(unwind::unwind STATIC IMPORTED)
35+
set_target_properties(unwind::unwind PROPERTIES
36+
IMPORTED_LOCATION "${UNWIND_LIBRARY}"
37+
INTERFACE_INCLUDE_DIRECTORIES "${UNWIND_INCLUDE_DIR}")
38+
target_compile_definitions(unwind::unwind INTERFACE UNWIND_FOUND)
3939
else()
40-
message(WARNING "Notice: UNWIND not found, no unwind support")
41-
add_library(unwind::unwind INTERFACE IMPORTED)
40+
message(WARNING "Notice: UNWIND not found, no unwind support")
41+
add_library(unwind::unwind INTERFACE IMPORTED)
4242
endif()
4343

4444
unset(UNWIND_INCLUDE_DIR)

include/ipfixprobe/inputPlugin.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ class IPXP_API PluginFactory;
117117
*/
118118
using InputPluginFactory = PluginFactory<InputPlugin, const std::string&>;
119119

120-
} // namespace ipxp
120+
} // namespace ipxp

include/ipfixprobe/pluginFactory/pluginFactory.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,4 @@ class PluginFactory {
167167
std::map<PluginManifest, Generators, PluginManifestComparator> m_registeredPlugins;
168168
};
169169

170-
} // namespace ipxp
170+
} // namespace ipxp

0 commit comments

Comments
 (0)