Strip tabs and trailing white spaces, and fix end of files (#748)

* format: Strip trailing whitespaces

We want to get rid of trailing whitespaces completly as they make just git
noice. Much better to start using automated tools to get rid of them once and
not getting them back again. This way git history will be cleaner and review
easier.

Commit was generated with:

    pre-commit run --all-files trailing-whitespace

* format: Files should have exactly one new line end of them

It is good practice that every file has one new line. It is not now days so
mandatory but it also is not nice if file has lot of newlines end of it. We will
use pre-commit which takes automatically care about this so let's fix all.

Commit was generated with:

    pre-commit run --all-files end-of-file-fixer

* format: Convert tabs to spaces

Project mostly use spaces over tabs. When mixing tabs and spaces this usually
makes formatting issues and also when changing those in commits it will make lot
of git noise. We will force spaces most of the time and use pre-commit to fix.

Commit was generated with:

    pre-commit run --all-files remove-tabs

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
This commit is contained in:
Kari Argillander
2024-08-25 22:13:57 +03:00
committed by GitHub
parent 9e0657424e
commit 369da70f2a
455 changed files with 7147 additions and 7249 deletions
-1
View File
@@ -50,4 +50,3 @@ COPY --from=builder /build/bin/* /opt/bacnet/bin/
EXPOSE 47808/udp EXPOSE 47808/udp
ENTRYPOINT ["/opt/bacnet/bin/bacserv"] ENTRYPOINT ["/opt/bacnet/bin/bacserv"]
CMD ["1234", "test_server"] CMD ["1234", "test_server"]
-1
View File
@@ -459,4 +459,3 @@ fuzz-afl: $(BACNET_LIB_TARGET)
.PHONY: writepropm .PHONY: writepropm
writepropm: $(BACNET_LIB_TARGET) writepropm: $(BACNET_LIB_TARGET)
$(MAKE) -B -C $@ $(MAKE) -B -C $@
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -53,4 +53,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -90,4 +90,3 @@ A simplistic bacnet.sh script will look like this (with stdout/stderr to /dev/nu
#!/bin/bash #!/bin/bash
/home/pi/bacnet-stack/bin/bacblinkt 9009 > /dev/null 2>&1 /home/pi/bacnet-stack/bin/bacblinkt 9009 > /dev/null 2>&1
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-3
View File
@@ -19,6 +19,3 @@ Caveats:
* This builds the target with ASAN (Address Sanitizer). This makes AFL require the `-m none` to not interpret ASAN's behavior as a crash * This builds the target with ASAN (Address Sanitizer). This makes AFL require the `-m none` to not interpret ASAN's behavior as a crash
* AFL uses a fork/exec model to launch the target. This is nice because each testcase is from a clean state. But this also brings in a lot of overhead. If you need something faster, check out ../fuzz-libfuzzer/ * AFL uses a fork/exec model to launch the target. This is nice because each testcase is from a clean state. But this also brings in a lot of overhead. If you need something faster, check out ../fuzz-libfuzzer/
-1
View File
@@ -48,4 +48,3 @@ READ of size 1 at 0x60200003b656 thread T0
Caveat: Caveat:
* Libfuzzer does not reinitialize the target on each testcase. This means that it will be much quicker than ../fuzz-afl/, BUT it will also be a little less stable. It also will not continue to fuzz after a crash is found (since the libfuzzer runtime shares a process with the target that just crashed). There may be some command line options to adopt a fork model. * Libfuzzer does not reinitialize the target on each testcase. This means that it will be much quicker than ../fuzz-afl/, BUT it will also be a little less stable. It also will not continue to fuzz after a crash is found (since the libfuzzer runtime shares a process with the target that just crashed). There may be some command line options to adopt a fork model.
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -134,4 +134,3 @@ $(document).ready(function(){
HighlightCode(this); HighlightCode(this);
}); });
}); });
-1
View File
@@ -866,4 +866,3 @@ sub LogAnswer {
$answer = '' unless $append; $answer = '' unless $append;
$answer .= $newAnswer; $answer .= $newAnswer;
} }
-2
View File
@@ -16,5 +16,3 @@ The BACnet Scriptable (using Perl) Tool.
Value) for Device at instance 1234 run the following command Value) for Device at instance 1234 run the following command
perl bacnet.pl --script example_readprop.pl -- 1234 perl bacnet.pl --script example_readprop.pl -- 1234
-1
View File
@@ -56,4 +56,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -17,4 +17,3 @@ fi
make -C libmcp23s17 make -C libmcp23s17
make -C libpifacedigital make -C libpifacedigital
-2
View File
@@ -6,5 +6,3 @@ To build, start with the configure script:
$ ./configure.sh $ ./configure.sh
$ make clean all $ make clean all
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-3
View File
@@ -127,6 +127,3 @@ mstp arguments:
5.2. Passing params in command line 5.2. Passing params in command line
1. sudo ./router -D "mstp" "/dev/ttyS0" --mac 1 127 1 --baud 38400 --network 4 -D "bip" "eth0" --network 1 1. sudo ./router -D "mstp" "/dev/ttyS0" --mac 1 127 1 --baud 38400 --network 4 -D "bip" "eth0" --network 1
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -42,4 +42,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -42,4 +42,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -75,4 +75,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-2
View File
@@ -755,5 +755,3 @@ List of Objects in test device:
} }
End of BACnet Protocol Implementation Conformance Statement End of BACnet Protocol Implementation Conformance Statement
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -40,4 +40,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -40,4 +40,3 @@ clean:
.PHONY: include .PHONY: include
include: .depend include: .depend
-1
View File
@@ -51,4 +51,3 @@ package "codespell"
# you can also execute arbitrary bash # you can also execute arbitrary bash
echo "🚀 ALL GOOD TO GO" echo "🚀 ALL GOOD TO GO"
-2
View File
@@ -143,5 +143,3 @@ while [ $# -gt 0 ] ; do
fi fi
run_test $ID run_test $ID
done done
-1
View File
@@ -42,4 +42,3 @@ for pid in ${pids[*]}; do
done done
killall bacserv killall bacserv
-1
View File
@@ -11,4 +11,3 @@ echo they register as a Foreign Device to it.
@echo on @echo on
set BACNET_BBMD_PORT=47808 set BACNET_BBMD_PORT=47808
set BACNET_BBMD_ADDRESS=%1 set BACNET_BBMD_ADDRESS=%1
-1
View File
@@ -23,4 +23,3 @@ do
${CONVERTER} ${filename} > ${TEMPFILE} ${CONVERTER} ${filename} > ${TEMPFILE}
mv ${TEMPFILE} ${filename} mv ${TEMPFILE} ${filename}
done done
Vendored
-1
View File
@@ -1,3 +1,2 @@
#!/bin/sh #!/bin/sh
# Nothing to do # Nothing to do
-1
View File
@@ -158,4 +158,3 @@ Q-18: I have downloaded the BACnet stack but can't get Who-Is or EPICS applicati
A-18: Firewalls on modern OS block incoming and outgoing network traffic and require you to 'allow' the port that BACnet/IP uses. To allow the default BACnet/IP UDP port 47808 Linux with UFW: A-18: Firewalls on modern OS block incoming and outgoing network traffic and require you to 'allow' the port that BACnet/IP uses. To allow the default BACnet/IP UDP port 47808 Linux with UFW:
$ sudo ufw allow 47808/udp $ sudo ufw allow 47808/udp
-1
View File
@@ -5,4 +5,3 @@ Q1: Cannot open include file: 'winsock2.h'
A1: Install the Microsoft Platform SDK: A1: Install the Microsoft Platform SDK:
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
-1
View File
@@ -45,4 +45,3 @@ AC:10:56:06:BA:C0=MAC address (router address) in hex
26001=DNET network number in decimal 26001=DNET network number in decimal
19=DADR MAC address in hex. Use colon to separate multibyte address. 19=DADR MAC address in hex. Use colon to separate multibyte address.
50=Max APDU 50=Max APDU
+5 -5
View File
@@ -74,7 +74,7 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@@ -129,7 +129,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on does not normally print such an announcement, your work based on
the Program is not required to print an announcement.) the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program, identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in and can be reasonably considered independent and separate works in
@@ -187,7 +187,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not distribution of the source code, even though third parties are not
compelled to copy the source along with the object code. compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program 4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is otherwise to copy, modify, sublicense or distribute the Program is
@@ -244,7 +244,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License. be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in 8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License original copyright holder who places the Program under this License
@@ -297,7 +297,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest If you develop a new program, and you want it to be of the greatest
-1
View File
@@ -13,4 +13,3 @@ monitor long 0xfffffc30 0x7
monitor sleep 100 monitor sleep 100
monitor long 0xfffffd08 0xa5000401 monitor long 0xfffffd08 0xa5000401
monitor sleep 100 monitor sleep 100
-1
View File
@@ -153,4 +153,3 @@ SECTIONS
_bss_end = . ; /* define a global symbol marking the end of the .bss section */ _bss_end = . ; /* define a global symbol marking the end of the .bss section */
} }
_end = .; /* define a global symbol marking the end of application RAM */ _end = .; /* define a global symbol marking the end of application RAM */
-2
View File
@@ -6,5 +6,3 @@
</project> </project>
<batchBuild/> <batchBuild/>
</workspace> </workspace>
-2
View File
@@ -6,5 +6,3 @@
</project> </project>
<batchBuild/> <batchBuild/>
</workspace> </workspace>
-2
View File
@@ -6,5 +6,3 @@
</project> </project>
<batchBuild/> <batchBuild/>
</workspace> </workspace>
-1
View File
@@ -40,4 +40,3 @@ DATABANK NAME=stackreg START=0xC00 END=0xDFF PROTECTED
//STACK SIZE=0x100 RAM=gpr13 //STACK SIZE=0x100 RAM=gpr13
STACK SIZE=0x200 RAM=stackreg STACK SIZE=0x200 RAM=stackreg
-1
View File
@@ -40,4 +40,3 @@ DATABANK NAME=stackreg START=0xC00 END=0xDFF PROTECTED
//STACK SIZE=0x100 RAM=gpr13 //STACK SIZE=0x100 RAM=gpr13
STACK SIZE=0x200 RAM=stackreg STACK SIZE=0x200 RAM=stackreg
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 162 KiB

-2
View File
@@ -6,5 +6,3 @@
</project> </project>
<batchBuild/> <batchBuild/>
</workspace> </workspace>
-2
View File
@@ -3,5 +3,3 @@ echo Build for Borland 5.5 tools
set BORLAND_DIR=c:\borland\bcc55 set BORLAND_DIR=c:\borland\bcc55
%BORLAND_DIR%\bin\make -f makefile.mak clean %BORLAND_DIR%\bin\make -f makefile.mak clean
%BORLAND_DIR%\bin\make -f makefile.mak all %BORLAND_DIR%\bin\make -f makefile.mak all
-1
View File
@@ -1,2 +1 @@
set BORLAND_DIR=\bcc55 set BORLAND_DIR=\bcc55
-1
View File
@@ -28,4 +28,3 @@ void mstimer_init(void)
{ {
} }
-1
View File
@@ -48,4 +48,3 @@ extern "C" {
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif #endif
-3
View File
@@ -112,6 +112,3 @@ extern "C" {
Accumulator_Name, Accumulator_Read_Property, Accumulator_Write_Property, \ Accumulator_Name, Accumulator_Read_Property, Accumulator_Write_Property, \
Accumulator_Property_Lists, NULL, NULL Accumulator_Property_Lists, NULL, NULL
#endif #endif
-1
View File
@@ -708,4 +708,3 @@ void Integer_Value_Init(void)
Object_List = Keylist_Create(); Object_List = Keylist_Create();
} }
} }
-1
View File
@@ -69,4 +69,3 @@ extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif #endif
-1
View File
@@ -388,4 +388,3 @@ bool tsm_invoke_id_failed(uint8_t invokeID)
return status; return status;
} }
#endif #endif
-1
View File
@@ -75,4 +75,3 @@ bool bacnet_calendar_entry_same(
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif #endif
-1
View File
@@ -87,4 +87,3 @@ int create_object_error_ack_encode(
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif #endif
-1
View File
@@ -57,4 +57,3 @@ int delete_object_decode_service_request(
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif #endif
-1
View File
@@ -80,4 +80,3 @@ int list_element_error_ack_decode(
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif #endif
-1
View File
@@ -38,4 +38,3 @@ add_executable(${PROJECT_NAME}
${ZTST_DIR}/ztest_mock.c ${ZTST_DIR}/ztest_mock.c
${ZTST_DIR}/ztest.c ${ZTST_DIR}/ztest.c
) )
-1
View File
@@ -449,4 +449,3 @@ help:
cmake_check_build_system: cmake_check_build_system:
cd /home/skarg/Projects/bacnet-stack && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 cd /home/skarg/Projects/bacnet-stack && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system .PHONY : cmake_check_build_system
-1
View File
@@ -532,4 +532,3 @@ zephyr_compile_definitions(
$<$<BOOL:${CONFIG_BACAPP_SCALE}>:BACAPP_SCALE> $<$<BOOL:${CONFIG_BACAPP_SCALE}>:BACAPP_SCALE>
$<$<BOOL:${CONFIG_BACAPP_SHED_LEVEL}>:BACAPP_SHED_LEVEL> $<$<BOOL:${CONFIG_BACAPP_SHED_LEVEL}>:BACAPP_SHED_LEVEL>
) )
-1
View File
@@ -8,4 +8,3 @@
#include "bacnet/basic/object/bacfile.h" #include "bacnet/basic/object/bacfile.h"
OBJECT_FUNCTIONS(Bacfile, BACNET_FILE_LISTING); OBJECT_FUNCTIONS(Bacfile, BACNET_FILE_LISTING);
-1
View File
@@ -10,4 +10,3 @@
#include "bacnet/basic/object/mso.h" #include "bacnet/basic/object/mso.h"
OBJECT_FUNCTIONS(Multistate_Output, MULTISTATE_OUTPUT_DESCR); OBJECT_FUNCTIONS(Multistate_Output, MULTISTATE_OUTPUT_DESCR);
@@ -29,4 +29,3 @@ target_include_directories(testbinary PRIVATE
CONFIG_ZTEST_NEW_API CONFIG_ZTEST_NEW_API
BACNET_STACK_DEPRECATED_DISABLE BACNET_STACK_DEPRECATED_DISABLE
) )