summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2024-01-03 00:16:50 +0300
committerEd Tanous <ed@tanous.net>2024-01-09 20:44:00 +0300
commit8ece0e457ee994e54c23ee7393fbce831d81a954 (patch)
treed673c8d7c744c2057a7250e4027e82249480c2fe
parentf3cb5df94799e94df37f9e2e6c2fcc473e0cae4a (diff)
downloadbmcweb-8ece0e457ee994e54c23ee7393fbce831d81a954.tar.xz
Fix spelling mistakes
These were found with: codespell -w $(git ls-files | grep "\.[hc]\(pp\)\?$") At some point in the future, we might want to get this enabled in CI. Change-Id: Iccb57b2adfd06a2e177e99db2923fe4e8e329118 Signed-off-by: Ed Tanous <ed@tanous.net>
-rw-r--r--.codespell-ignore14
-rw-r--r--CLIENTS.md2
-rw-r--r--DBUS_USAGE.md2
-rw-r--r--DEVELOPING.md2
-rw-r--r--Redfish.md2
-rw-r--r--TESTING.md4
-rw-r--r--http/complete_response_fields.hpp10
-rw-r--r--http/http_client.hpp2
-rw-r--r--http/http_connection.hpp2
-rw-r--r--http/logging.hpp6
-rw-r--r--http/server_sent_event.hpp6
-rw-r--r--include/dbus_singleton.hpp4
-rw-r--r--include/http_utility.hpp6
-rw-r--r--include/human_sort.hpp2
-rw-r--r--include/ibm/locks.hpp2
-rw-r--r--include/ssl_key_handler.hpp8
-rw-r--r--redfish-core/include/error_messages.hpp4
-rw-r--r--redfish-core/include/event_service_manager.hpp2
-rw-r--r--redfish-core/include/redfish_aggregator.hpp2
-rw-r--r--redfish-core/include/utils/query_param.hpp10
-rw-r--r--redfish-core/include/utils/time_utils.hpp4
-rw-r--r--redfish-core/lib/account_service.hpp2
-rw-r--r--redfish-core/lib/certificate_service.hpp2
-rw-r--r--redfish-core/lib/chassis.hpp2
-rw-r--r--redfish-core/lib/event_service.hpp2
-rw-r--r--redfish-core/lib/led.hpp8
-rw-r--r--redfish-core/lib/redfish_sessions.hpp2
-rw-r--r--redfish-core/lib/sensors.hpp4
-rw-r--r--redfish-core/lib/update_service.hpp2
-rwxr-xr-xscripts/generate_schema_collections.py2
-rwxr-xr-xscripts/generate_schema_enums.py2
-rw-r--r--test/http/utility_test.cpp4
-rw-r--r--test/include/http_utility_test.cpp22
-rw-r--r--test/redfish-core/include/redfish_aggregator_test.cpp2
34 files changed, 83 insertions, 69 deletions
diff --git a/.codespell-ignore b/.codespell-ignore
new file mode 100644
index 0000000000..22d32a5a3e
--- /dev/null
+++ b/.codespell-ignore
@@ -0,0 +1,14 @@
+# Upstream redfish uses the British version of Cancelled, instead of Caneled
+redfish-core/include/registries/task_event_message_registry.hpp
+redfish-core/include/generated/enums/task.hpp
+redfish-core/include/generated/enums/job.hpp
+redfish-core/lib/task.hpp
+redfish-core/lib/log_services.hpp
+
+# Drive Redfish has "UnEncrypted" typoed as "UnEcrypted"
+redfish-core/include/generated/enums/drive.hpp
+
+# Base registry has some typos in descriptions
+redfish-core/include/registries/base_message_registry.hpp
+
+subprojects/*
diff --git a/CLIENTS.md b/CLIENTS.md
index c5436bb52e..ce99de7e30 100644
--- a/CLIENTS.md
+++ b/CLIENTS.md
@@ -37,7 +37,7 @@ properly. <https://github.com/gkbrk/slowloris>
Status: Passing, no automated enforcement.
-testssl.sh: A tool for verifying the corectness of the bmcweb cipher suites
+testssl.sh: A tool for verifying the correctness of the bmcweb cipher suites
against current recommended security standards
<https://github.com/drwetter/testssl.sh>
diff --git a/DBUS_USAGE.md b/DBUS_USAGE.md
index 577bf9f888..94502077e0 100644
--- a/DBUS_USAGE.md
+++ b/DBUS_USAGE.md
@@ -8,7 +8,7 @@ schemas:
verified that _all_ OpenBMC implementers of the interface support that
property.
- If an implementation presents a property that doesn't match the type specified
- by the interface at any version, it shall be repored as a 500 error.
+ by the interface at any version, it shall be reported as a 500 error.
- If the DBus interface definition has an "unknown" or "unspecified" value,
detecting these will omit the property from the Redfish tree, in line with the
Redfish specification.
diff --git a/DEVELOPING.md b/DEVELOPING.md
index 5468f798e7..a2dc3c9d93 100644
--- a/DEVELOPING.md
+++ b/DEVELOPING.md
@@ -193,7 +193,7 @@ Security: There may be cases where maintainers make explicit breaking changes in
the best interest of security; In these rare cases, the maintainers and
contributors will endeavor to avoid breaking clients as much as is technically
possible, but as with all security, impact will need to be weighed against the
-security impact of not making changes, and judgement calls will be made, with
+security impact of not making changes, and judgment calls will be made, with
options to allow providing the old behavior.
### clang-tidy
diff --git a/Redfish.md b/Redfish.md
index 32e266af21..7290aa41c2 100644
--- a/Redfish.md
+++ b/Redfish.md
@@ -221,7 +221,7 @@ Fields common to all schemas
- Drives
- Drives@odata.count
-- Status (this is dependant on a entity manager association from Chassis to
+- Status (this is dependent on a entity manager association from Chassis to
Drives)
### /redfish/v1/Chassis/{ChassisId}/EnvironmentMetrics/
diff --git a/TESTING.md b/TESTING.md
index e98e5f8ba0..5052d7bd0e 100644
--- a/TESTING.md
+++ b/TESTING.md
@@ -59,7 +59,7 @@ are the steps for using the SDK and QEMU.
commands would need to use 18080 to communicate.
- If running within a system that has read-only /usr/ filesystem, issue the
- following commands one time per QEMU boot to make the filesystem writeable
+ following commands one time per QEMU boot to make the filesystem writable
```sh
mkdir -p /var/persist/usr
@@ -123,7 +123,7 @@ $ python scripts/websocket_test.py --host 1.2.3.4:443 --ssl
### Redfish Validator
-Commiters are required to run the
+Committers are required to run the
[Redfish Validator](https://github.com/DMTF/Redfish-Service-Validator.git)
anytime they make a change to the GET behavior of the redfish tree. The test
must run on real hardware since the resource tree will be more complete.
diff --git a/http/complete_response_fields.hpp b/http/complete_response_fields.hpp
index a5b3eec3d0..8323dcaa3d 100644
--- a/http/complete_response_fields.hpp
+++ b/http/complete_response_fields.hpp
@@ -32,14 +32,14 @@ inline void completeResponseFields(const Request& req, Response& res)
using http_helpers::ContentType;
std::array<ContentType, 3> allowed{ContentType::CBOR, ContentType::JSON,
ContentType::HTML};
- ContentType prefered =
- getPreferedContentType(req.getHeaderValue("Accept"), allowed);
+ ContentType preferred =
+ getPreferredContentType(req.getHeaderValue("Accept"), allowed);
- if (prefered == ContentType::HTML)
+ if (preferred == ContentType::HTML)
{
json_html_util::prettyPrintJson(res);
}
- else if (prefered == ContentType::CBOR)
+ else if (preferred == ContentType::CBOR)
{
res.addHeader(boost::beast::http::field::content_type,
"application/cbor");
@@ -49,7 +49,7 @@ inline void completeResponseFields(const Request& req, Response& res)
}
else
{
- // Technically prefered could also be NoMatch here, but we'd
+ // Technically preferred could also be NoMatch here, but we'd
// like to default to something rather than return 400 for
// backward compatibility.
res.addHeader(boost::beast::http::field::content_type,
diff --git a/http/http_client.hpp b/http/http_client.hpp
index 4bae31d7de..076d852e90 100644
--- a/http/http_client.hpp
+++ b/http/http_client.hpp
@@ -696,7 +696,7 @@ class ConnectionPool : public std::enable_shared_from_this<ConnectionPool>
if (!requestQueue.empty())
{
BMCWEB_LOG_DEBUG(
- "{} requests remaining in queue for {}, reusing connnection {}",
+ "{} requests remaining in queue for {}, reusing connection {}",
requestQueue.size(), destIP, connId);
setConnProps(*conn);
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index 175912d577..7ea0ac6d01 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -632,7 +632,7 @@ class Connection :
if (ec == boost::asio::error::operation_aborted)
{
- // Canceled wait means the path succeeeded.
+ // Canceled wait means the path succeeded.
return;
}
if (ec)
diff --git a/http/logging.hpp b/http/logging.hpp
index 3fdef7e744..781bcfb9b2 100644
--- a/http/logging.hpp
+++ b/http/logging.hpp
@@ -166,9 +166,9 @@ struct FormatString
std::source_location loc;
// NOLINTNEXTLINE(google-explicit-constructor)
- FormatString(const char* strIn, const std::source_location& locIn =
- std::source_location::current()) :
- str(strIn),
+ FormatString(const char* stringIn, const std::source_location& locIn =
+ std::source_location::current()) :
+ str(stringIn),
loc(locIn)
{}
};
diff --git a/http/server_sent_event.hpp b/http/server_sent_event.hpp
index 773394836f..49002f60db 100644
--- a/http/server_sent_event.hpp
+++ b/http/server_sent_event.hpp
@@ -97,11 +97,11 @@ class ConnectionImpl : public Connection
boost::beast::http::status::ok, 11, BodyType{});
res.set(boost::beast::http::field::content_type, "text/event-stream");
res.body().more = true;
- boost::beast::http::response_serializer<BodyType>& ser =
+ boost::beast::http::response_serializer<BodyType>& serial =
serializer.emplace(std::move(res));
boost::beast::http::async_write_header(
- adaptor, ser,
+ adaptor, serial,
std::bind_front(&ConnectionImpl::sendSSEHeaderCallback, this,
shared_from_this()));
}
@@ -257,7 +257,7 @@ class ConnectionImpl : public Connection
if (ec == boost::asio::error::operation_aborted)
{
BMCWEB_LOG_DEBUG("operation aborted");
- // Canceled wait means the path succeeeded.
+ // Canceled wait means the path succeeded.
return;
}
if (ec)
diff --git a/include/dbus_singleton.hpp b/include/dbus_singleton.hpp
index 67f57b7104..2448636a62 100644
--- a/include/dbus_singleton.hpp
+++ b/include/dbus_singleton.hpp
@@ -6,8 +6,8 @@ namespace crow
namespace connections
{
-// Initialze before using!
-// Please see webserver_main for the example how this variable is initialzed,
+// Initialize before using!
+// Please see webserver_main for the example how this variable is initialized,
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
extern sdbusplus::asio::connection* systemBus;
diff --git a/include/http_utility.hpp b/include/http_utility.hpp
index 4f430aeb8e..ae436caf1c 100644
--- a/include/http_utility.hpp
+++ b/include/http_utility.hpp
@@ -45,8 +45,8 @@ constexpr std::array<ContentTypePair, 5> contentTypes{{
}};
inline ContentType
- getPreferedContentType(std::string_view header,
- std::span<const ContentType> preferedOrder)
+ getPreferredContentType(std::string_view header,
+ std::span<const ContentType> preferedOrder)
{
size_t lastIndex = 0;
while (lastIndex < header.size() + 1)
@@ -103,7 +103,7 @@ inline bool isContentTypeAllowed(std::string_view header, ContentType type,
bool allowWildcard)
{
auto types = std::to_array({type});
- ContentType allowed = getPreferedContentType(header, types);
+ ContentType allowed = getPreferredContentType(header, types);
if (allowed == ContentType::ANY)
{
return allowWildcard;
diff --git a/include/human_sort.hpp b/include/human_sort.hpp
index fba98041d0..d248cbafdf 100644
--- a/include/human_sort.hpp
+++ b/include/human_sort.hpp
@@ -98,7 +98,7 @@ inline int alphanumComp(std::string_view left, std::string_view right)
}
// A generic template type compatible with std::less that can be used on generic
-// containers (set, map, ect)
+// containers (set, map, etc)
template <class Type>
struct AlphanumLess
{
diff --git a/include/ibm/locks.hpp b/include/ibm/locks.hpp
index 2208aaffed..7a161fc754 100644
--- a/include/ibm/locks.hpp
+++ b/include/ibm/locks.hpp
@@ -379,7 +379,7 @@ inline bool Lock::isValidLockRequest(const LockRequest& refLockRecord)
(static_cast<int>(std::get<4>(refLockRecord).size()) < 2))
{
BMCWEB_LOG_DEBUG("Validation of Number of Segments Failed");
- BMCWEB_LOG_DEBUG("Number of Segments provied : {}",
+ BMCWEB_LOG_DEBUG("Number of Segments provided : {}",
std::get<4>(refLockRecord).size());
return false;
}
diff --git a/include/ssl_key_handler.hpp b/include/ssl_key_handler.hpp
index f8142cf24b..5ce7cc7a41 100644
--- a/include/ssl_key_handler.hpp
+++ b/include/ssl_key_handler.hpp
@@ -204,7 +204,7 @@ inline X509* loadCert(const std::string& filePath)
BIO* certFileBio = BIO_new_file(filePath.c_str(), "rb");
if (certFileBio == nullptr)
{
- BMCWEB_LOG_ERROR("Error occured during BIO_new_file call, FILE= {}",
+ BMCWEB_LOG_ERROR("Error occurred during BIO_new_file call, FILE= {}",
filePath);
return nullptr;
}
@@ -212,7 +212,7 @@ inline X509* loadCert(const std::string& filePath)
X509* cert = X509_new();
if (cert == nullptr)
{
- BMCWEB_LOG_ERROR("Error occured during X509_new call, {}",
+ BMCWEB_LOG_ERROR("Error occurred during X509_new call, {}",
ERR_get_error());
BIO_free(certFileBio);
return nullptr;
@@ -221,7 +221,7 @@ inline X509* loadCert(const std::string& filePath)
if (PEM_read_bio_X509(certFileBio, &cert, nullptr, nullptr) == nullptr)
{
BMCWEB_LOG_ERROR(
- "Error occured during PEM_read_bio_X509 call, FILE= {}", filePath);
+ "Error occurred during PEM_read_bio_X509 call, FILE= {}", filePath);
BIO_free(certFileBio);
X509_free(cert);
@@ -266,7 +266,7 @@ inline void generateSslCertificate(const std::string& filepath,
if (x509 != nullptr)
{
// get a random number from the RNG for the certificate serial
- // number If this is not random, regenerating certs throws broswer
+ // number If this is not random, regenerating certs throws browser
// errors
bmcweb::OpenSSLGenerator gen;
std::uniform_int_distribution<int> dis(
diff --git a/redfish-core/include/error_messages.hpp b/redfish-core/include/error_messages.hpp
index 6c5952d727..09ac36eb2c 100644
--- a/redfish-core/include/error_messages.hpp
+++ b/redfish-core/include/error_messages.hpp
@@ -554,7 +554,7 @@ void operationFailed(crow::Response& res);
/**
* @brief Formats OperationTimeout message into JSON
- * Message body: "A timeout internal to the service occured as part of the
+ * Message body: "A timeout internal to the service occurred as part of the
* request. Partial results may have been returned."
*
*
@@ -1058,7 +1058,7 @@ void invalidUpload(crow::Response& res, std::string_view arg1,
/**
* @brief Formats InsufficientStorage message into JSON
- * Message body: "Insufficent storage or memory available to complete the
+ * Message body: "Insufficient storage or memory available to complete the
* request."
* @returns Message InsufficientStorage formatted to JSON */
nlohmann::json insufficientStorage();
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
index acdb00ebf5..7399d2e15e 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -1072,7 +1072,7 @@ class EventServiceManager
std::string strMsg = msgJson.dump(
2, ' ', true, nlohmann::json::error_handler_t::replace);
entry->sendEvent(std::move(strMsg));
- eventId++; // increament the eventId
+ eventId++; // increment the eventId
}
else
{
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index 680e1b0c05..4ce25fdcf3 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -343,7 +343,7 @@ static inline void addPrefixes(nlohmann::json& json, std::string_view prefix)
continue;
}
- // Recusively parse the rest of the json
+ // Recursively parse the rest of the json
addPrefixes(item.second, prefix);
}
return;
diff --git a/redfish-core/include/utils/query_param.hpp b/redfish-core/include/utils/query_param.hpp
index 5fa4852390..55c92bca42 100644
--- a/redfish-core/include/utils/query_param.hpp
+++ b/redfish-core/include/utils/query_param.hpp
@@ -689,7 +689,7 @@ inline std::vector<ExpandNode>
// Formats a query parameter string for the sub-query.
// Returns std::nullopt on failures.
// This function shall handle $select when it is added.
-// There is no need to handle parameters that's not campatible with $expand,
+// There is no need to handle parameters that's not compatible with $expand,
// e.g., $only, since this function will only be called in side $expand handlers
inline std::optional<std::string> formatQueryForExpand(const Query& query)
{
@@ -727,7 +727,7 @@ inline std::optional<std::string> formatQueryForExpand(const Query& query)
return str;
}
-// Propogates the worst error code to the final response.
+// Propagates the worst error code to the final response.
// The order of error code is (from high to low)
// 500 Internal Server Error
// 511 Network Authentication Required
@@ -741,7 +741,7 @@ inline std::optional<std::string> formatQueryForExpand(const Query& query)
// 502 Bad Gateway
// 501 Not Implemented
// 401 Unauthorized
-// 451 - 409 Error codes (not listed explictly)
+// 451 - 409 Error codes (not listed explicitly)
// 408 Request Timeout
// 407 Proxy Authentication Required
// 406 Not Acceptable
@@ -753,7 +753,7 @@ inline std::optional<std::string> formatQueryForExpand(const Query& query)
inline unsigned propogateErrorCode(unsigned finalCode, unsigned subResponseCode)
{
// We keep a explicit list for error codes that this project often uses
- // Higer priority codes are in lower indexes
+ // Higher priority codes are in lower indexes
constexpr std::array<unsigned, 13> orderedCodes = {
500, 507, 503, 502, 501, 401, 412, 409, 406, 405, 404, 403, 400};
size_t finalCodeIndex = std::numeric_limits<size_t>::max();
@@ -790,7 +790,7 @@ inline unsigned propogateErrorCode(unsigned finalCode, unsigned subResponseCode)
return std::max(finalCode, subResponseCode);
}
-// Propogates all error messages into |finalResponse|
+// Propagates all error messages into |finalResponse|
inline void propogateError(crow::Response& finalResponse,
crow::Response& subResponse)
{
diff --git a/redfish-core/include/utils/time_utils.hpp b/redfish-core/include/utils/time_utils.hpp
index fbee6ce44e..ee7dd4a013 100644
--- a/redfish-core/include/utils/time_utils.hpp
+++ b/redfish-core/include/utils/time_utils.hpp
@@ -391,7 +391,7 @@ inline std::string getDateTimeStdtime(std::time_t secondsSinceEpoch)
/**
* Returns the current Date, Time & the local Time Offset
- * infromation in a pair
+ * information in a pair
*
* @param[in] None
*
@@ -404,7 +404,7 @@ inline std::pair<std::string, std::string> getDateTimeOffsetNow()
std::string dateTime = getDateTimeStdtime(time);
/* extract the local Time Offset value from the
- * recevied dateTime string.
+ * received dateTime string.
*/
std::string timeOffset("Z00:00");
std::size_t lastPos = dateTime.size();
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index a6b8c495b8..d897fcdb8d 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -152,7 +152,7 @@ inline bool translateUserGroup(const std::vector<std::string>& userGroups,
}
else
{
- // Invalid user group name. Caller throws an excption.
+ // Invalid user group name. Caller throws an exception.
return false;
}
}
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp
index 00e509ddb7..8bdcb53626 100644
--- a/redfish-core/lib/certificate_service.hpp
+++ b/redfish-core/lib/certificate_service.hpp
@@ -583,7 +583,7 @@ static std::unique_ptr<sdbusplus::bus::match_t> csrMatcher;
* @brief Read data from CSR D-bus object and set to response
*
* @param[in] asyncResp Shared pointer to the response message
- * @param[in] certURI Link to certifiate collection URI
+ * @param[in] certURI Link to certificate collection URI
* @param[in] service D-Bus service name
* @param[in] certObjPath certificate D-Bus object path
* @param[in] csrObjPath CSR D-Bus object path
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp
index 72f5011db2..06ce58392b 100644
--- a/redfish-core/lib/chassis.hpp
+++ b/redfish-core/lib/chassis.hpp
@@ -224,7 +224,7 @@ inline void getChassisContainedBy(
}
if (upstreamChassisPaths.size() > 1)
{
- BMCWEB_LOG_ERROR("{} is contained by mutliple chassis", chassisId);
+ BMCWEB_LOG_ERROR("{} is contained by multiple chassis", chassisId);
messages::internalError(asyncResp->res);
return;
}
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index ee8fc5da1d..8bc8f9b1ae 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -452,7 +452,7 @@ inline void requestRoutesEventDestinationCollection(App& app)
if (context)
{
- // This value is selected aribitrarily.
+ // This value is selected arbitrarily.
constexpr const size_t maxContextSize = 256;
if (context->size() > maxContextSize)
{
diff --git a/redfish-core/lib/led.hpp b/redfish-core/lib/led.hpp
index b5d12fb865..baf9235ee9 100644
--- a/redfish-core/lib/led.hpp
+++ b/redfish-core/lib/led.hpp
@@ -46,7 +46,7 @@ inline void
if (ec == boost::system::errc::invalid_argument)
{
BMCWEB_LOG_DEBUG(
- "Get identity blinking LED failed, missmatch in property type");
+ "Get identity blinking LED failed, mismatch in property type");
messages::internalError(asyncResp->res);
return;
}
@@ -68,7 +68,7 @@ inline void
if (ec2 == boost::system::errc::invalid_argument)
{
BMCWEB_LOG_DEBUG(
- "Get enclosure identity led failed, missmatch in property type");
+ "Get enclosure identity led failed, mismatch in property type");
messages::internalError(asyncResp->res);
return;
}
@@ -176,7 +176,7 @@ inline void getSystemLocationIndicatorActive(
if (ec == boost::system::errc::invalid_argument)
{
BMCWEB_LOG_DEBUG(
- "Get identity blinking LED failed, missmatch in property type");
+ "Get identity blinking LED failed, mismatch in property type");
messages::internalError(asyncResp->res);
return;
}
@@ -198,7 +198,7 @@ inline void getSystemLocationIndicatorActive(
if (ec2 == boost::system::errc::invalid_argument)
{
BMCWEB_LOG_DEBUG(
- "Get enclosure identity led failed, missmatch in property type");
+ "Get enclosure identity led failed, mismatch in property type");
messages::internalError(asyncResp->res);
return;
}
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp
index 341e6d001f..7061c9aa70 100644
--- a/redfish-core/lib/redfish_sessions.hpp
+++ b/redfish-core/lib/redfish_sessions.hpp
@@ -311,7 +311,7 @@ inline void handleSessionServicePatch(
if (sessionTimeout)
{
- // The mininum & maximum allowed values for session timeout
+ // The minimum & maximum allowed values for session timeout
// are 30 seconds and 86400 seconds respectively as per the
// session service schema mentioned at
// https://redfish.dmtf.org/schemas/v1/SessionService.v1_1_7.json
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 530e1f1748..19e32cec7f 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -718,7 +718,7 @@ inline void setLedState(nlohmann::json& sensorJson,
* @param sensorName The name of the sensor to be built
* @param sensorType The type (temperature, fan_tach, etc) of the sensor to
* build
- * @param chassisSubNode The subnode (thermal, sensor, ect) of the sensor
+ * @param chassisSubNode The subnode (thermal, sensor, etc) of the sensor
* @param propertiesDict A dictionary of the properties to build the sensor
* from.
* @param sensorJson The json object to fill
@@ -961,7 +961,7 @@ inline void objectPropertiesToJson(
* @param sensorName The name of the sensor to be built
* @param sensorType The type (temperature, fan_tach, etc) of the sensor to
* build
- * @param chassisSubNode The subnode (thermal, sensor, ect) of the sensor
+ * @param chassisSubNode The subnode (thermal, sensor, etc) of the sensor
* @param interfacesDict A dictionary of the interfaces and properties of said
* interfaces to be built from
* @param sensorJson The json object to fill
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 2f0cc47021..9ab1a3b16b 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -196,7 +196,7 @@ static void
// allow them time to complete the
// update (probably cycle the
// system) if this expires then
- // task will be cancelled
+ // task will be canceled
taskData->extendTimer(std::chrono::hours(5));
return !task::completed;
}
diff --git a/scripts/generate_schema_collections.py b/scripts/generate_schema_collections.py
index d6efa0efe2..c44ca59155 100755
--- a/scripts/generate_schema_collections.py
+++ b/scripts/generate_schema_collections.py
@@ -199,7 +199,7 @@ def parse_navigation_property(
if new_path == "/redfish/v1/Tasks":
new_path2 = "/redfish/v1/TaskService"
- # If we had to apply special handling then we need to remove the inital
+ # If we had to apply special handling then we need to remove the initial
# version of the URI if it was previously added
if new_path2 != "":
if new_path in seen_paths:
diff --git a/scripts/generate_schema_enums.py b/scripts/generate_schema_enums.py
index 3a147ffd82..a2e7ee2e2f 100755
--- a/scripts/generate_schema_enums.py
+++ b/scripts/generate_schema_enums.py
@@ -91,7 +91,7 @@ def write_enum_list(redfish_defs_file, enum_list, snake_case_namespace):
values = element.values
if "Invalid" not in values:
values.insert(0, "Invalid")
- # nlohmann::json aparently uses c style arrays in their enum
+ # nlohmann::json apparently uses c style arrays in their enum
# implementation, and clang-tidy isn't smart enough to figure out that
# the C arrays are in their code not bmcwebs, so we have to explicitly
# ignore the error.
diff --git a/test/http/utility_test.cpp b/test/http/utility_test.cpp
index cc21bbcf2f..5f62d3f3d1 100644
--- a/test/http/utility_test.cpp
+++ b/test/http/utility_test.cpp
@@ -162,9 +162,9 @@ TEST(AppendUrlFromPieces, PiecesAreAppendedViaDelimiters)
appendUrlPieces(url, "bar");
EXPECT_EQ(std::string_view(url.data(), url.size()), "/redfish/v1/foo/bar");
- appendUrlPieces(url, "/", "bad&tring");
+ appendUrlPieces(url, "/", "bad&string");
EXPECT_EQ(std::string_view(url.data(), url.size()),
- "/redfish/v1/foo/bar/%2F/bad&tring");
+ "/redfish/v1/foo/bar/%2F/bad&string");
}
} // namespace
diff --git a/test/include/http_utility_test.cpp b/test/include/http_utility_test.cpp
index 6878001e6a..915b168b49 100644
--- a/test/include/http_utility_test.cpp
+++ b/test/include/http_utility_test.cpp
@@ -51,36 +51,36 @@ TEST(isContentTypeAllowed, ContainsQFactorWeightingReturnsTrue)
ContentType::OctetStream, true));
}
-TEST(getPreferedContentType, PositiveTest)
+TEST(getPreferredContentType, PositiveTest)
{
std::array<ContentType, 1> contentType{ContentType::HTML};
EXPECT_EQ(
- getPreferedContentType("text/html, application/json", contentType),
+ getPreferredContentType("text/html, application/json", contentType),
ContentType::HTML);
std::array<ContentType, 2> htmlJson{ContentType::HTML, ContentType::JSON};
- EXPECT_EQ(getPreferedContentType("text/html, application/json", htmlJson),
+ EXPECT_EQ(getPreferredContentType("text/html, application/json", htmlJson),
ContentType::HTML);
std::array<ContentType, 2> jsonHtml{ContentType::JSON, ContentType::HTML};
- EXPECT_EQ(getPreferedContentType("text/html, application/json", jsonHtml),
+ EXPECT_EQ(getPreferredContentType("text/html, application/json", jsonHtml),
ContentType::HTML);
std::array<ContentType, 2> cborJson{ContentType::CBOR, ContentType::JSON};
- EXPECT_EQ(
- getPreferedContentType("application/cbor, application::json", cborJson),
- ContentType::CBOR);
+ EXPECT_EQ(getPreferredContentType("application/cbor, application::json",
+ cborJson),
+ ContentType::CBOR);
- EXPECT_EQ(getPreferedContentType("application/json", cborJson),
+ EXPECT_EQ(getPreferredContentType("application/json", cborJson),
ContentType::JSON);
- EXPECT_EQ(getPreferedContentType("*/*", cborJson), ContentType::ANY);
+ EXPECT_EQ(getPreferredContentType("*/*", cborJson), ContentType::ANY);
}
-TEST(getPreferedContentType, NegativeTest)
+TEST(getPreferredContentType, NegativeTest)
{
std::array<ContentType, 1> contentType{ContentType::CBOR};
EXPECT_EQ(
- getPreferedContentType("text/html, application/json", contentType),
+ getPreferredContentType("text/html, application/json", contentType),
ContentType::NoMatch);
}
} // namespace
diff --git a/test/redfish-core/include/redfish_aggregator_test.cpp b/test/redfish-core/include/redfish_aggregator_test.cpp
index 26015f7096..0739355974 100644
--- a/test/redfish-core/include/redfish_aggregator_test.cpp
+++ b/test/redfish-core/include/redfish_aggregator_test.cpp
@@ -137,7 +137,7 @@ TEST(addPrefixToItem, TopLevelCollections)
{
std::string initial("/redfish/v1/" + std::string(root));
jsonRequest["@odata.id"] = initial;
- addPrefixToItem(jsonRequest["@odata.id"], "perfix");
+ addPrefixToItem(jsonRequest["@odata.id"], "prefix");
EXPECT_EQ(jsonRequest["@odata.id"], initial);
}
}