Skip to content

Commit

Permalink
fix cpplint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
phlptp committed Oct 17, 2024
1 parent 89a38e1 commit fbcb0f8
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 5 deletions.
7 changes: 3 additions & 4 deletions converter/converter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ SPDX-License-Identifier: BSD-3-Clause
#include "CLI11.hpp"
#include "units/units.hpp"
#include <cstdio>
#include <string>

int main(int argc, char* argv[])
{
Expand Down Expand Up @@ -42,10 +43,8 @@ int main(int argc, char* argv[])
newUnits,
"the units to convert the measurement to, '*' to convert to base units")
->required();
app.add_flag_callback("--version,-v", []() {
std::cout << "Units conversion " UNITS_VERSION_STRING << '\n';
throw CLI::Success();
});
app.set_version_flag("--version,-v","Units conversion " UNITS_VERSION_STRING);

app.positionals_at_end();

CLI11_PARSE(app, argc, argv);
Expand Down
2 changes: 2 additions & 0 deletions test/fuzz_issue_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ SPDX-License-Identifier: BSD-3-Clause
#include <cstring>
#include <fstream>
#include <iostream>
#include <vector>
#include <string>

using namespace units;
TEST(fuzzFailures, convFailures)
Expand Down
1 change: 1 addition & 0 deletions test/test_all_unit_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SPDX-License-Identifier: BSD-3-Clause
#include "units/units.hpp"

#include <limits>
#include <iostream>
using namespace units;

TEST(allUnits, all)
Expand Down
1 change: 1 addition & 0 deletions test/test_conversions2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SPDX-License-Identifier: BSD-3-Clause
#include <algorithm>
#include <fstream>
#include <vector>
#include <string>

// structure containing information on a single conversion
struct convValue {
Expand Down
1 change: 1 addition & 0 deletions test/test_defined_units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SPDX-License-Identifier: BSD-3-Clause
#include "units/units_conversion_maps.hpp"
#include <map>
#include <unordered_map>
#include <string>

TEST(unitStringDefinitions, siVectorLength)
{
Expand Down
2 changes: 2 additions & 0 deletions test/test_equation_units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ SPDX-License-Identifier: BSD-3-Clause
#include "test.hpp"
#include "units/units.hpp"

#include <vector>

using namespace units;

TEST(logUnits, nonEquality)
Expand Down
2 changes: 2 additions & 0 deletions test/test_google_units.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ SPDX-License-Identifier: BSD-3-Clause
#include <fstream>
#include <ostream>
#include <sstream>
#include <string>
#include <iostream>

TEST(googleUnits, unitTypes)
{
Expand Down
2 changes: 2 additions & 0 deletions test/test_measurement_strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ SPDX-License-Identifier: BSD-3-Clause

#include <iostream>
#include <type_traits>
#include <vector>
#include <string>

using namespace units;
TEST(MeasurementStrings, basic)
Expand Down
2 changes: 2 additions & 0 deletions test/test_r20.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ SPDX-License-Identifier: BSD-3-Clause
#include "units/units.hpp"

#include <tuple>
#include <string>
#include <iostream>

using unitD = std::tuple<const char*, const char*, units::precise_unit>;
#ifdef ENABLE_UNIT_MAP_ACCESS
Expand Down
1 change: 1 addition & 0 deletions test/test_random_round_trip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ SPDX-License-Identifier: BSD-3-Clause
#include <chrono>
#include <limits>
#include <random>
#include <vector>

using namespace units;

Expand Down
3 changes: 3 additions & 0 deletions test/test_siunits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ SPDX-License-Identifier: BSD-3-Clause
#include <fstream>
#include <ostream>
#include <sstream>
#include <vector>
#include <string>
#include <utility>

static std::vector<std::vector<std::string>>
loadCsvFile(const std::string& file)
Expand Down
3 changes: 3 additions & 0 deletions test/test_ucum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ SPDX-License-Identifier: BSD-3-Clause
#include <json.hpp>
#include <ostream>
#include <sstream>
#include <set>
#include <string>
#include <iostream>

TEST(UCUM, domain_exclusion)
{
Expand Down
2 changes: 2 additions & 0 deletions test/test_udunits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ SPDX-License-Identifier: BSD-3-Clause
#include <fstream>
#include <ostream>
#include <sstream>
#include <string>
#include <iostream>

TEST(UDUNITS, acceptedNameSymbols)
{
Expand Down
1 change: 1 addition & 0 deletions test/test_uncertain_measurements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SPDX-License-Identifier: BSD-3-Clause
#include "units/units.hpp"

#include <memory>
#include <string>

using namespace units;
TEST(uncertainOps, construction)
Expand Down
3 changes: 3 additions & 0 deletions test/test_unit_strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ SPDX-License-Identifier: BSD-3-Clause

#include "test.hpp"
#include <algorithm>
#include <limits>
#include <string>
#include <vector>

#if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703)
#ifndef UNITS_CONSTEXPR_IF_SUPPORTED
Expand Down
1 change: 1 addition & 0 deletions units/r20_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ SPDX-License-Identifier: BSD-3-Clause
#include <cstring>
#include <tuple>
#include <unordered_map>
#include <string>

namespace units {
namespace precise {
Expand Down
2 changes: 1 addition & 1 deletion units/unit_definitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ namespace precise {
} // namespace metric

namespace ING {
// l'Imprimerie nationale, ING
// l'Imprimerie nationale, IN Group
constexpr precise_unit point{0.4, mm};
constexpr precise_unit pica{12.0, point};
} // namespace ING
Expand Down
1 change: 1 addition & 0 deletions units/x12_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SPDX-License-Identifier: BSD-3-Clause
#include <array>
#include <cstring>
#include <tuple>
#include <string>

namespace UNITS_NAMESPACE {
using unitD = std::tuple<const char*, const char*, precise_unit>;
Expand Down
1 change: 1 addition & 0 deletions webserver/unit_web_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ SPDX-License-Identifier: BSD-3-Clause
#include <string>
#include <thread>
#include <vector>
#include <utility>

#include "units/units.hpp"

Expand Down

0 comments on commit fbcb0f8

Please sign in to comment.