Skip to content

Commit 4aa166a

Browse files
Remove legacy settings and configs
1 parent 27cafb4 commit 4aa166a

File tree

8 files changed

+78
-317
lines changed

8 files changed

+78
-317
lines changed

.clang-format

Lines changed: 61 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,64 @@
11
---
2-
Language: Cpp
3-
# BasedOnStyle: Google
4-
AccessModifierOffset: -1
5-
ConstructorInitializerIndentWidth: 4
6-
AlignEscapedNewlinesLeft: true
7-
AlignTrailingComments: true
8-
AllowAllParametersOfDeclarationOnNextLine: true
9-
AllowShortBlocksOnASingleLine: false
10-
AllowShortIfStatementsOnASingleLine: true
11-
AllowShortLoopsOnASingleLine: true
12-
AllowShortFunctionsOnASingleLine: All
13-
AlwaysBreakTemplateDeclarations: true
14-
AlwaysBreakBeforeMultilineStrings: true
15-
BreakBeforeBinaryOperators: false
16-
BreakBeforeTernaryOperators: true
17-
BreakConstructorInitializersBeforeComma: false
18-
BinPackParameters: true
19-
ColumnLimit: 80
20-
ConstructorInitializerAllOnOneLineOrOnePerLine: true
21-
DerivePointerAlignment: true
22-
ExperimentalAutoDetectBinPacking: false
23-
IndentCaseLabels: true
24-
IndentWrappedFunctionNames: false
25-
IndentFunctionDeclarationAfterType: false
26-
MaxEmptyLinesToKeep: 1
27-
KeepEmptyLinesAtTheStartOfBlocks: false
28-
NamespaceIndentation: None
29-
ObjCSpaceAfterProperty: false
30-
ObjCSpaceBeforeProtocolList: false
31-
PenaltyBreakBeforeFirstCallParameter: 1
32-
PenaltyBreakComment: 300
33-
PenaltyBreakString: 1000
34-
PenaltyBreakFirstLessLess: 120
35-
PenaltyExcessCharacter: 1000000
36-
PenaltyReturnTypeOnItsOwnLine: 200
2+
# Based on the Google C++ Style Guide, with user-specific overrides.
3+
BasedOnStyle: Google
4+
5+
# --- User Overrides from Uncrustify Config ---
6+
7+
# 1. Indentation
8+
# Google Style default is 2, but we keep the explicit setting just in case.
9+
# Uncrustify: indent_columns=2
10+
IndentWidth: 2
11+
12+
# 2. Tabs
13+
# Google Style default is Never, but explicitly set here.
14+
# Uncrustify: indent_with_tabs=0
15+
UseTab: Never
16+
17+
# 3. Column Width
18+
# Uncrustify: code_width=80
19+
ColumnLimit: 80
20+
21+
# 4. Brace Wrapping
22+
# The Google Style default is already to attach braces to the line end
23+
# (e.g., `if (x) { ... }`).
24+
# Uncrustify: nl_class_brace=remove, nl_fdef_brace=remove
25+
# We keep the default: BreakBeforeBraces: Attach
26+
27+
# 5. Assignment Alignment
28+
# This is a key deviation from the Google default, which is usually 'None'.
29+
# Uncrustify: indent_align_assign=true
30+
AlignConsecutiveAssignments: true
31+
32+
# 6. Function Parameter Packing (Google default is to pack)
33+
# Uncrustify: nl_func_def_args=add (Suggests placing each arg on a new line)
34+
BinPackArguments: false
35+
BinPackParameters: false # Applies to declarations
36+
37+
# 7. Pointer Alignment
38+
# Google Style prefers the star next to the type ('int* foo').
39+
# Uncrustify: sp_before_ptr_star=add (e.g. 'int * a;')
40+
# We stick to the Google default: PointerAlignment: Left (or None, which often results in Left).
3741
PointerAlignment: Left
38-
SpacesBeforeTrailingComments: 2
39-
Cpp11BracedListStyle: true
40-
Standard: Auto
41-
IndentWidth: 2
42-
TabWidth: 8
43-
UseTab: Never
44-
BreakBeforeBraces: Attach
45-
SpacesInParentheses: false
46-
SpacesInAngles: false
47-
SpaceInEmptyParentheses: false
48-
SpacesInCStyleCastParentheses: false
49-
SpacesInContainerLiterals: true
50-
SpaceBeforeAssignmentOperators: true
51-
ContinuationIndentWidth: 4
52-
CommentPragmas: '^ IWYU pragma:'
53-
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
54-
SpaceBeforeParens: ControlStatements
55-
DisableFormat: false
56-
...
5742

43+
# 8. Namespace Indentation
44+
# Google Style default is false, matching:
45+
# Uncrustify: indent_namespace=false
46+
IndentNamespace: false
47+
48+
# 9. Case Label Indentation
49+
# Google Style default is to indent `case` labels.
50+
# Uncrustify: indent_switch_case=2 (Suggests indenting case labels)
51+
IndentCaseLabels: true
52+
53+
# 10. Operator Alignment
54+
# Uncrustify: align_left_shift=true
55+
AlignOperands: Align
56+
57+
# 11. Newlines/Block Handling
58+
# Uncrustify: mod_full_brace_if=add, mod_full_brace_for=add, etc.
59+
# These are generally handled by Google's requirement for braces, even for single statements.
60+
AllowShortBlocksOnASingleLine: Never
61+
AllowShortIfStatementsOnASingleLine: Never
62+
AllowShortCaseLabelsOnASingleLine: Never
63+
AllowShortFunctionsOnASingleLine: Empty
64+
...

.gitattributes

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Code formatter settings
2-
*.c filter=uncrustify
3-
*.cpp filter=uncrustify
4-
*.h filter=uncrustify
5-
*.hpp filter=uncrustify
6-
71
# Set the default behavior, in case people don't have core.autocrlf set.
82
* text=auto
93

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,5 @@ CMakeFiles
1616
devicedata.h
1717
source/src/ports/POSIX/OpENer
1818
source/cip_objects/
19-
2019
.vscode/
21-
22-
2320
build/

.travis.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

README.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=EIPStackGroup_OpENer&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=EIPStackGroup_OpENer)
2-
[![Join the chat at https://gitter.im/EIPStackGroupOpENer/Lobby](https://badges.gitter.im/EIPStackGroupOpENer/Lobby.svg)](https://gitter.im/EIPStackGroupOpENer/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
3-
4-
51
OpENer Version 2.3.0
62
====================
73

84
Welcome to OpENer!
95
------------------
106

11-
OpENer is an EtherNet/IP™ stack for I/O adapter devices; supports multiple
7+
OpENer is an EtherNet/IP™ stack for I/O adapter devices; supports multiple
128
I/O and explicit connections; includes objects and services to make EtherNet/IP™-
13-
compliant products defined in THE ETHERNET/IP SPECIFICATION and published by
9+
compliant products defined in THE ETHERNET/IP SPECIFICATION and published by
1410
ODVA (http://www.odva.org).
1511

1612
Participate!
@@ -24,23 +20,23 @@ Users mailing list: https://groups.google.com/forum/#!forum/eip-stack-group-open
2420
Requirements:
2521
-------------
2622
OpENer has been developed to be highly portable. The default version targets PCs
27-
with a POSIX operating system and a BSD-socket network interface. To test this
28-
version we recommend a Linux PC or Windows with Cygwin (http://www.cygwin.com)
23+
with a POSIX operating system and a BSD-socket network interface. To test this
24+
version we recommend a Linux PC or Windows with Cygwin (http://www.cygwin.com)
2925
installed. You will need to have the following installed:
3026

3127
* CMake
3228
* gcc
3329
* make
3430
* binutils
3531
* the development library of libcap (libcap-dev or equivalient)
36-
32+
3733
for normal building. These should be installed on most Linux installations and
3834
are part of the development packages of Cygwin.
3935

4036
If you want to run the unit tests you will also have to download CppUTest via
4137
https://github.com/cpputest/cpputest
4238

43-
For configuring the project we recommend the use of a CMake GUI (e.g., the
39+
For configuring the project we recommend the use of a CMake GUI (e.g., the
4440
cmake-gui package on Linux, or the Installer for Windows available at [CMake](https://cmake.org/))
4541

4642
Compile for Linux/POSIX:
@@ -78,7 +74,7 @@ Compile for Windows XP/7/8 via Visual Studio:
7874
e.g. ``OpENer 3``
7975

8076
In order to get the correct interface index enter the command ``route print`` in a command promt and search for the MAC address of your chosen network interface at the beginning of the output. The leftmost number is the corresponding interface index.
81-
77+
8278
Compile for Windows XP/7/8/10 via Cygwin:
8379
--------------------------------------
8480
The POSIX setup file can be reused for Cygwin. Please note, that you cannot use RT mode and you will have to remove the code responsible for checking and getting the needed capabilities, as libcap is not available in Cygwin. The easier and more supported way to build OpENer for Windows is to either use MinGW or Visual Studio.
@@ -88,15 +84,15 @@ Compile for MinGW on Windows XP/7/8/10
8884
1. Make sure 64 bit mingw is installed. (Test with gcc --version, should show x86_64-posix-seh-rev1)
8985
2. Make sure CMake is installed. (Test with cmake --version, should be version 3.xx)
9086
3. Change to <opener install dir>/bin/mingw
91-
4. Run the command `setup_mingw.bat` in a dos command line. (Not a bash shell). If tracing is desired,
87+
4. Run the command `setup_mingw.bat` in a dos command line. (Not a bash shell). If tracing is desired,
9288
use the following (where the cmake parameter must be enclosed in quotes) or change the ./source/CMakeList.txt file.
9389
```
9490
setup_mingw.bat "-DOpENer_TRACES:BOOL=TRUE"
9591
```
9692
5. Run the command "make" from the same directory (./bin/mingw)
9793
6. The opener.exe is now found in <opener install dir>\bin\mingw\src\ports\MINGW
9894
7. Start it like this: "opener 192.168.250.22", where the ip address is the local computer's address on the nettwork you want to use.
99-
95+
10096
Directory structure:
10197
--------------------
10298
- bin ... The resulting binaries and make files for different ports
@@ -115,18 +111,18 @@ Directory structure:
115111

116112
Documentation:
117113
--------------
118-
The documentation of the functions of OpENer is part of the source code. The source
119-
packages contain the generated documentation in the directory doc/api_doc. If you
120-
use the GIT version you will need the program Doxygen for generating the HTML
121-
documentation. You can generate the documentation by invoking doxygen from the
114+
The documentation of the functions of OpENer is part of the source code. The source
115+
packages contain the generated documentation in the directory doc/api_doc. If you
116+
use the GIT version you will need the program Doxygen for generating the HTML
117+
documentation. You can generate the documentation by invoking doxygen from the
122118
command line in the opener main directory.
123119

124120

125121
Fuzzing
126122
--------------
127123
### Intro
128-
Fuzzing is an automated testing method that directs varying input data to a program in
129-
order to monitor output. It is a way to test for overall reliability as well as identify
124+
Fuzzing is an automated testing method that directs varying input data to a program in
125+
order to monitor output. It is a way to test for overall reliability as well as identify
130126
potential security bugs.
131127

132128
The fuzzer we are using is AFL, a fuzzer that uses runtime guided techniques to create input for the tested program. From a high-level prespective AFL works as follows:
@@ -152,7 +148,7 @@ echo "AFL is ready at: $(which afl-fuzz)"
152148

153149
Then, compile OpENer with AFL:
154150
1. Change to the ``OpENer/bin/posix`` directory
155-
2. Compile OpENer with AFL ``./setup_posix_fuzz_afl.sh``
151+
2. Compile OpENer with AFL ``./setup_posix_fuzz_afl.sh``
156152
3. Run ``make``
157153

158154
### Fuzz
@@ -205,7 +201,7 @@ Shut down all the instances: docker-compose down
205201

206202
Porting OpENer:
207203
---------------
208-
For porting OpENer to new platforms please see the porting section in the
204+
For porting OpENer to new platforms please see the porting section in the
209205
Doxygen documentation.
210206

211207
Contributing to OpENer:

TODO

Lines changed: 0 additions & 20 deletions
This file was deleted.

sonar-project.properties

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)