Skip to content

Commit aaff919

Browse files
author
Pavel Siska
committed
editorconfig - fix editor config warnings
1 parent 5a30593 commit aaff919

File tree

128 files changed

+1515
-1521
lines changed

Some content is hidden

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

128 files changed

+1515
-1521
lines changed

.github/actions/install-dependencies/action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ inputs:
2121
description: 'Install DPDK dependencies'
2222
required: false
2323
default: false
24-
24+
2525
nemea:
2626
description: 'Install NEMEA dependencies'
2727
required: false
@@ -31,7 +31,7 @@ inputs:
3131
description: 'Install dependencies for tests'
3232
required: false
3333
default: false
34-
34+
3535
runs:
3636
using: 'composite'
3737
steps:
@@ -40,15 +40,15 @@ runs:
4040
run: |
4141
dnf config-manager --set-enabled ol9_codeready_builder
4242
dnf install -y dnf-plugins-core epel-release
43-
dnf install -y make gcc-c++ cmake3 git rpm-build
43+
dnf install -y make gcc-c++ cmake3 git rpm-build
4444
dnf install -y fuse3-devel openssl-devel gcc-toolset-14-libatomic-devel libunwind-devel lz4-devel
4545
4646
- name: Install clang tools
4747
if: ${{ inputs.clang-tools == 'true' }}
4848
shell: bash
4949
run: |
5050
dnf install -y clang clang-tools-extra
51-
51+
5252
- name: Install libpcap-devel
5353
if: ${{ inputs.pcap == 'true' }}
5454
shell: bash
@@ -61,20 +61,20 @@ runs:
6161
run: |
6262
dnf copr enable @CESNET/nfb-framework
6363
dnf install -y nfb-framework numactl-devel
64-
64+
6565
- name: Install DPDK dependencies
6666
if: ${{ inputs.dpdk == 'true' }}
6767
shell: bash
6868
run: |
6969
dnf install -y dpdk-devel
70-
70+
7171
- name: Install NEMEA dependencies
7272
if: ${{ inputs.nemea == 'true' }}
7373
shell: bash
7474
run: |
7575
dnf copr enable @CESNET/NEMEA-stable
7676
dnf install -y nemea-framework-devel
77-
77+
7878
- name: Install dependencies for tests
7979
if: ${{ inputs.tests == 'true' }}
8080
shell: bash

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ jobs:
2626
run: git config --system --add safe.directory $PWD
2727
- name: Create build directory
2828
run: mkdir build
29-
- name: Configure CMake
29+
- name: Configure CMake
3030
run: |
3131
cd build
3232
cmake3 .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_INPUT_PCAP=ON -DENABLE_INPUT_DPDK=ON -DENABLE_INPUT_NFB=ON -DENABLE_PROCESS_EXPERIMENTAL=ON
3333
- name: make
3434
run: make
35-

.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

.github/workflows/ciEntryPoint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: ./.github/workflows/build.yml
2828
with:
2929
os: ${{ matrix.os }}
30-
30+
3131
make-tests:
3232
needs: [build-os-matrix]
3333
strategy:

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: git config --system --add safe.directory $PWD
2727
- name: Create build directory
2828
run: mkdir build
29-
- name: Configure CMake
29+
- name: Configure CMake
3030
run: |
3131
cd build
3232
cmake3 .. -DENABLE_NEMEA=ON -DENABLE_INPUT_PCAP=ON -DENABLE_OUTPUT_UNIREC=ON -DENABLE_PROCESS_EXPERIMENTAL=ON -DENABLE_TESTS=ON

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: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,23 @@
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} ${CMAKE_INSTALL_LIBDIR})
1211

1312
include(FindPackageHandleStandardArgs)
1413
find_package_handle_standard_args (Atomic
15-
REQUIRED_VARS ATOMIC_LIBRARY
14+
REQUIRED_VARS ATOMIC_LIBRARY
1615
)
1716

1817
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)
18+
add_library(atomic::atomic STATIC IMPORTED)
19+
set_target_properties(atomic::atomic PROPERTIES
20+
IMPORTED_LOCATION "${ATOMIC_LIBRARY}"
21+
INTERFACE_INCLUDE_DIRECTORIES "${ATOMIC_INCLUDE_DIR}")
22+
target_compile_definitions(atomic::atomic INTERFACE UNWIND_FOUND)
2423
else()
25-
message(CRITICAL "Notice: atomic not found")
26-
add_library(atomic::atomic INTERFACE IMPORTED)
24+
message(CRITICAL "Notice: atomic not found")
25+
add_library(atomic::atomic INTERFACE IMPORTED)
2726
endif()
2827

2928
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()

0 commit comments

Comments
 (0)