Skip to content

refactor: improve code quality and add packet processing tests

ce389fb
Select commit
Loading
Failed to load commit list.
Open

Redesign NUClearNet and rename to nuclearnet #190

refactor: improve code quality and add packet processing tests
ce389fb
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed May 28, 2026 in 1m 22s

Quality Gate failed

Failed conditions
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check failure on line 311 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Explicitly capture "this" in a non-transient lambda.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5tKRnFG-RPh9mCiuQ_&open=AZ5tKRnFG-RPh9mCiuQ_&pullRequest=190

Check warning on line 49 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Do not use the constructor's initializer list for data member "discovery". Use the in-class initializer instead.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9JpE8YQNFI7nDsw&open=AZ5oA9JpE8YQNFI7nDsw&pullRequest=190

Check warning on line 393 in src/Reactor.hpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Declaration shadows a field "args" in the outer scope.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9KpE8YQNFI7nDth&open=AZ5oA9KpE8YQNFI7nDth&pullRequest=190

Check failure on line 59 in src/util/network/sock_t.hpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "operator==" to check object equality, "in6_addr" is not a trivially copyable type without padding.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9KaE8YQNFI7nDtZ&open=AZ5oA9KaE8YQNFI7nDtZ&pullRequest=190

Check warning on line 589 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this specialization with "bool" of "std::vector".

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5tOtMWhJ2iGPVI1yeM&open=AZ5tOtMWhJ2iGPVI1yeM&pullRequest=190

Check warning on line 58 in src/nuclearnet/Discovery.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the commented out code.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9JaE8YQNFI7nDsq&open=AZ5oA9JaE8YQNFI7nDsq&pullRequest=190

Check warning on line 80 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Handle this exception or don't catch it at all.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5tOtMWhJ2iGPVI1yeJ&open=AZ5tOtMWhJ2iGPVI1yeJ&pullRequest=190

Check warning on line 110 in src/nuclearnet/Discovery.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the commented out code.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9JaE8YQNFI7nDsr&open=AZ5oA9JaE8YQNFI7nDsr&pullRequest=190

Check failure on line 617 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

const_cast removing const qualification from the type of a pointer may lead to an undefined behaviour.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5tEot6oIt0FrcHv56N&open=AZ5tEot6oIt0FrcHv56N&pullRequest=190

Check failure on line 79 in src/util/network/sock_t.hpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "operator==" to check object equality, "in6_addr" is not a trivially copyable type without padding.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9KaE8YQNFI7nDte&open=AZ5oA9KaE8YQNFI7nDte&pullRequest=190

Check warning on line 565 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this specialization with "bool" of "std::vector".

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9JpE8YQNFI7nDtH&open=AZ5oA9JpE8YQNFI7nDtH&pullRequest=190

Check warning on line 110 in src/nuclearnet/Reliability.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this specialization with "bool" of "std::vector".

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9KIE8YQNFI7nDtW&open=AZ5oA9KIE8YQNFI7nDtW&pullRequest=190

Check warning on line 204 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "::" to access "htonl".

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9JpE8YQNFI7nDs2&open=AZ5oA9JpE8YQNFI7nDs2&pullRequest=190

Check warning on line 532 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this specialization with "bool" of "std::vector".

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5tOtMWhJ2iGPVI1yeL&open=AZ5tOtMWhJ2iGPVI1yeL&pullRequest=190

Check warning on line 45 in src/nuclearnet/wire_protocol.hpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this "enum" with "enum class".

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9JCE8YQNFI7nDsn&open=AZ5oA9JCE8YQNFI7nDsn&pullRequest=190

Check warning on line 153 in src/nuclearnet/Reliability.hpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this specialization with "bool" of "std::vector".

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9JgE8YQNFI7nDsu&open=AZ5oA9JgE8YQNFI7nDsu&pullRequest=190

Check warning on line 611 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This function should be declared "const".

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5tOtMWhJ2iGPVI1yeN&open=AZ5tOtMWhJ2iGPVI1yeN&pullRequest=190

Check failure on line 325 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

const_cast removing const qualification from the type of a pointer may lead to an undefined behaviour.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5tKRnFG-RPh9mCiuRB&open=AZ5tKRnFG-RPh9mCiuRB&pullRequest=190

Check warning on line 53 in src/nuclearnet/NUClearNet.hpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Make sure using this hardcoded IP address is safe here.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9KCE8YQNFI7nDtS&open=AZ5oA9KCE8YQNFI7nDtS&pullRequest=190

Check warning on line 130 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "::" to access "htonl".

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9JpE8YQNFI7nDs0&open=AZ5oA9JpE8YQNFI7nDs0&pullRequest=190

Check warning on line 54 in src/nuclearnet/wire_protocol.hpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this "enum" with "enum class".

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9JCE8YQNFI7nDso&open=AZ5oA9JCE8YQNFI7nDso&pullRequest=190

Check warning on line 37 in src/nuclearnet/Reliability.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This function has 8 parameters, which is greater than the 7 authorized.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9KIE8YQNFI7nDtV&open=AZ5oA9KIE8YQNFI7nDtV&pullRequest=190

Check warning on line 76 in src/util/network/sock_t.hpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "::" to access "ntohs".

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9KaE8YQNFI7nDtd&open=AZ5oA9KaE8YQNFI7nDtd&pullRequest=190

Check failure on line 273 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

const_cast removing const qualification from the type of a pointer may lead to an undefined behaviour.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5oA9JpE8YQNFI7nDs6&open=AZ5oA9JpE8YQNFI7nDs6&pullRequest=190

Check failure on line 617 in src/nuclearnet/NUClearNet.cpp

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

const_cast removing const qualification from the type of a pointer may lead to an undefined behaviour.

See more on https://sonarcloud.io/project/issues?id=Fastcode_NUClear&issues=AZ5tEot6oIt0FrcHv56M&open=AZ5tEot6oIt0FrcHv56M&pullRequest=190