summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDidier Wenzek <didier.wenzek@free.fr>2022-09-12 10:12:13 +0200
committerGitHub <noreply@github.com>2022-09-12 10:12:13 +0200
commit6e501845907897ef7df410d9390ba3afb2818a09 (patch)
treeaf90ae578c77d0809eb8ce43585aa990232f2689
parentafd7e2c7e31ce96b9cf795e5a01280925e4b9de5 (diff)
parent8ceb66d8c96b41af242d6438413e9b81fb572828 (diff)
Merge pull request #1413 from matthiasbeyer/typos
Fix typos
-rw-r--r--.github/workflows/pull-request-checks.yml9
-rw-r--r--.typos.toml7
-rw-r--r--GOVERNANCE.md6
-rwxr-xr-xci/ci_smoke_test_az.sh4
-rwxr-xr-xci/ci_smoke_test_c8y.sh2
-rwxr-xr-xci/configure_bridge.sh2
-rwxr-xr-xci/find_device_id.py4
-rwxr-xr-xci/report/report_builder.py2
-rwxr-xr-xci/roundtrip_local_to_az.py4
-rw-r--r--configuration/contrib/collectd/collectd.conf2
-rw-r--r--crates/common/certificate/src/lib.rs13
-rw-r--r--crates/common/certificate/src/test_certificate.txt11
-rw-r--r--crates/common/tedge_config/src/settings.rs2
-rw-r--r--crates/common/tedge_config/src/tedge_config_repository.rs2
-rw-r--r--crates/common/tedge_utils/src/file.rs2
-rw-r--r--crates/common/tedge_utils/src/fs_notify.rs4
-rw-r--r--crates/core/c8y_api/src/http_proxy.rs2
-rw-r--r--crates/core/tedge/src/cli/connect/command.rs2
-rw-r--r--crates/core/tedge/src/system_services/mod.rs2
-rw-r--r--crates/core/tedge/tests/main.rs2
-rw-r--r--crates/core/tedge_agent/src/agent.rs24
-rw-r--r--crates/core/tedge_mapper/src/c8y/mapper.rs2
-rw-r--r--crates/tests/sawtooth_publisher/src/main.rs2
-rw-r--r--docs/src/architecture/faq.md2
-rw-r--r--docs/src/howto-guides/012_install_and_enable_software_management.md2
-rw-r--r--docs/src/howto-guides/020_monitor_tedge_health.md2
-rw-r--r--docs/src/howto-guides/025_config_management_plugin.md4
-rw-r--r--docs/src/references/plugin-api.md2
-rw-r--r--docs/src/tutorials/software-management.md2
-rw-r--r--plugins/c8y_log_plugin/src/logfile_request.rs4
-rw-r--r--plugins/c8y_log_plugin/src/main.rs2
-rw-r--r--plugins/tedge_docker-compose_plugin/docker-compose2
-rw-r--r--tests/PySys/Readme.md2
-rw-r--r--tests/PySys/misc_features/invalid_device_id/run.py2
-rw-r--r--tests/PySys/misc_features/valid_device_id/run.py6
-rw-r--r--tests/PySys/plugin_apama/Input/TedgeTestMonitor.mon2
-rw-r--r--tests/PySys/plugin_apama/Input/TedgeTestMonitorV2.mon2
-rw-r--r--tests/PySys/plugin_apama/environment_apama_plugin.py2
-rw-r--r--tests/PySys/plugin_apt/apt_fail_noarg/pysystest.xml2
-rw-r--r--tests/PySys/plugin_apt/apt_fail_noarg/run.py2
-rw-r--r--tests/PySys/plugin_apt/apt_sequence_install_with_version/run.py2
-rw-r--r--tests/PySys/plugin_docker/environment_docker_plugin.py2
-rw-r--r--tests/PySys/software_management_end_to_end/environment_sm_management.py12
-rw-r--r--tests/PySys/software_management_end_to_end/sm_apt_install_download_path/run.py4
-rw-r--r--tests/PySys/software_management_end_to_end/sm_apt_install_remove/run.py4
-rw-r--r--tests/PySys/software_management_end_to_end/sm_apt_install_remove_default/run.py4
-rw-r--r--tests/PySys/software_management_end_to_end/sm_apt_install_remove_multiple/run.py4
-rw-r--r--tests/PySys/software_management_end_to_end/sm_apt_install_remove_multiple_mixed/run.py4
-rw-r--r--tests/PySys/software_management_end_to_end/sm_apt_install_remove_with_version/run.py4
-rw-r--r--tests/PySys/software_management_end_to_end/sm_docker_install_remove_multiple/run.py6
-rw-r--r--tests/PySys/software_management_end_to_end/sm_fake_install_remove/run.py4
-rw-r--r--tests/PySys/software_management_end_to_end/sm_fake_install_remove_multiple/run.py4
-rw-r--r--tests/PySys/software_management_end_to_end/sm_mixed_install_remove_multiple/run.py4
-rw-r--r--tests/PySys/tedge/call_tedge_-h_-V/run.py2
-rw-r--r--tests/PySys/tedge_agent/agent_init_session/run.py2
-rw-r--r--tests/PySys/tedge_connect/c8y_restart_bridge/run.py2
-rw-r--r--tests/PySys/tedge_mapper_c8y/runtime_start_two_mappers/run.py2
-rw-r--r--tests/PySys/tedge_mapper_c8y/tedge_mapper_c8y_child_device_measurement/run.py2
58 files changed, 119 insertions, 103 deletions
diff --git a/.github/workflows/pull-request-checks.yml b/.github/workflows/pull-request-checks.yml
index 9c029163..6ac2c091 100644
--- a/.github/workflows/pull-request-checks.yml
+++ b/.github/workflows/pull-request-checks.yml
@@ -341,6 +341,15 @@ jobs:
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
+ typos:
+ name: Spell Check with Typos
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: crate-ci/typos@master
+ continue-on-error: true
+ - run: exit 0
+
### Disable cargo-tarpaulin as some tests failed only in this step
# cargo-tarpaulin:
# name: Run cargo tarpaulin
diff --git a/.typos.toml b/.typos.toml
new file mode 100644
index 00000000..b5006ffc
--- /dev/null
+++ b/.typos.toml
@@ -0,0 +1,7 @@
+[default.extend-words]
+mosquitto = "mosquitto"
+hda = "hda"
+
+[files]
+extend-exclude = [ "**certificate.txt" ]
+
diff --git a/GOVERNANCE.md b/GOVERNANCE.md
index 0b7bff10..cce4d1b7 100644
--- a/GOVERNANCE.md
+++ b/GOVERNANCE.md
@@ -130,7 +130,7 @@ The following chapters do not talk about major releases (increasing "x" in a
### Preface
The following chapter describes the release process of the thin-edge.io project
-and the corrosponding crates.
+and the corresponding crates.
The goal of the workflow described in this chapter is to have _as little impact
as possible_ on the general development of the project.
@@ -152,7 +152,7 @@ with the [exceptions implied by the cargo implementation of the standard](https:
Parts of the API that are covered by semver are explicitly marked. Our public
API is extensively tested in integration tests. If changes to the public API of
-thin-egde.io are necessary, these changes are documented in the `CHANGELOG.md`
+thin-edge.io are necessary, these changes are documented in the `CHANGELOG.md`
file of the project, with reasoning why the change was necessary and how users
can upgrade to the new interface(s).
@@ -202,7 +202,7 @@ The responsibilities of the release maintainers are:
* Submit pull requests to the `main` branch to update all version numbers for
the next release cycle
-It is explicitely allowed for everyone to open bugfix-backport pull requests to
+It is explicitly allowed for everyone to open bugfix-backport pull requests to
a release branch, but the release maintainer(s) decide when and how to apply
them to the release branch.
diff --git a/ci/ci_smoke_test_az.sh b/ci/ci_smoke_test_az.sh
index b28fd57a..4e3113b8 100755
--- a/ci/ci_smoke_test_az.sh
+++ b/ci/ci_smoke_test_az.sh
@@ -2,7 +2,7 @@
# Smoke test for Azure IoT
# The bridge should be already configured (done by configure_bridge.sh)
-# lets avoid to create a new certifiate in this script as it is shared with C8y.
+# lets avoid to create a new certificate in this script as it is shared with C8y.
# This script is intended to be executed by a GitHub self-hosted runner
# on a Raspberry Pi.
@@ -14,7 +14,7 @@ sudo tedge disconnect c8y
set -e
# The bridge should be already configured
-# lets avoid to create a new certifiate here ()
+# lets avoid to create a new certificate here ()
# ./ci/configure_bridge.sh
# Read device thumbprint from command line
diff --git a/ci/ci_smoke_test_c8y.sh b/ci/ci_smoke_test_c8y.sh
index 3aa8516a..da48a2ee 100755
--- a/ci/ci_smoke_test_c8y.sh
+++ b/ci/ci_smoke_test_c8y.sh
@@ -113,5 +113,5 @@ sleep 12
# Uses thin-edge JSON for publishing
./ci/roundtrip_local_to_c8y.py -m JSON -pub "$EXAMPLEDIR" -u "$C8YUSERNAME" -t "$C8YTENANT" -id "$C8YDEVICEID"
-echo "Disonnect again"
+echo "Disconnect again"
sudo tedge disconnect c8y
diff --git a/ci/configure_bridge.sh b/ci/configure_bridge.sh
index b64847c4..628110f3 100755
--- a/ci/configure_bridge.sh
+++ b/ci/configure_bridge.sh
@@ -58,7 +58,7 @@ set -e
# Give Cumolocity time to process the cert deletion
sleep 2
-# Connect and disconnect so that we can retrive a new device ID
+# Connect and disconnect so that we can retrieve a new device ID
sudo tedge connect c8y
sudo tedge disconnect c8y
diff --git a/ci/find_device_id.py b/ci/find_device_id.py
index 721824b6..293f9aea 100755
--- a/ci/find_device_id.py
+++ b/ci/find_device_id.py
@@ -23,12 +23,12 @@ from retry_decorator import retry
@retry(Exception, tries=5, timeout_secs=2)
def get_device_id(c8y, name):
- """retrive the current device ID"""
+ """retrieve the current device ID"""
devices = c8y.device_inventory.get_all(name=name)
if len(devices) == 1:
return devices[0].id
- raise SystemError("Failed to retrive ID")
+ raise SystemError("Failed to retrieve ID")
def main():
diff --git a/ci/report/report_builder.py b/ci/report/report_builder.py
index c4821049..b113fd35 100755
--- a/ci/report/report_builder.py
+++ b/ci/report/report_builder.py
@@ -101,7 +101,7 @@ def unpack_reports(runner):
def postprocess_runner(runner):
"""Postprocess results from a runner.
- Fails if a test foler is missing that is mentioned in the runner
+ Fails if a test folder is missing that is mentioned in the runner
configuration.
"""
diff --git a/ci/roundtrip_local_to_az.py b/ci/roundtrip_local_to_az.py
index bace0d60..6986daf2 100755
--- a/ci/roundtrip_local_to_az.py
+++ b/ci/roundtrip_local_to_az.py
@@ -18,7 +18,7 @@ $ ./roundtrip_local_to_az.py -a 10 -p sas_policy -b thinedgebus -q testqueue
Alternatively:
./ci/roundtrip_local_to_az.py eventhub
Set Env:
- - AZUREENDPOINT : Endpoint descritpion string copied from the Azure UI
+ - AZUREENDPOINT : Endpoint description string copied from the Azure UI
- AZUREEVENTHUB : Name of the IoT Hub
"""
@@ -121,7 +121,7 @@ def retrieve_queue_az(
f"https://{service_bus_name}.servicebus.windows.net/{queue_name}/messages/head"
)
- print(f"Downloading mesages from {url}")
+ print(f"Downloading messages from {url}")
headers = {
"Accept": "application/json",
"Content-Type": "application/json;charset=utf-8",
diff --git a/configuration/contrib/collectd/collectd.conf b/configuration/contrib/collectd/collectd.conf
index a623d39e..6123d893 100644
--- a/configuration/contrib/collectd/collectd.conf
+++ b/configuration/contrib/collectd/collectd.conf
@@ -1249,7 +1249,7 @@ LoadPlugin mqtt
# Version 1
# Community "community_string"
# Collect "std_traffic"
-# Inverval 120
+# Interval 120
# Timeout 10
# Retries 1
# </Host>
diff --git a/crates/common/certificate/src/lib.rs b/crates/common/certificate/src/lib.rs
index bdec16a0..e9ad13aa 100644
--- a/crates/common/certificate/src/lib.rs
+++ b/crates/common/certificate/src/lib.rs
@@ -379,18 +379,7 @@ mod tests {
#[test]
fn check_thumbprint_static_certificate() {
- let cert_content = r#"-----BEGIN CERTIFICATE-----
-MIIBlzCCAT2gAwIBAgIBKjAKBggqhkjOPQQDAjA7MQ8wDQYDVQQDDAZteS10YnIx
-EjAQBgNVBAoMCVRoaW4gRWRnZTEUMBIGA1UECwwLVGVzdCBEZXZpY2UwHhcNMjEw
-MzA5MTQxMDMwWhcNMjIwMzEwMTQxMDMwWjA7MQ8wDQYDVQQDDAZteS10YnIxEjAQ
-BgNVBAoMCVRoaW4gRWRnZTEUMBIGA1UECwwLVGVzdCBEZXZpY2UwWTATBgcqhkjO
-PQIBBggqhkjOPQMBBwNCAAR6DVDOQ9ey3TX4tD2V0zCYe8GtmUHekNZZX6P+lUXx
-886P/Kkyra0xCYKam2me2VzdLMc4X5cpRkybVa0XH/WCozIwMDAdBgNVHQ4EFgQU
-Iz8LzGgzHjqsvB+ppPsVa+xf2bYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQD
-AgNIADBFAiEAhMAATBcZqE3Li1TZCzDoweBxRw1WD6gaSAcrsIWuW94CIHuR5ZG7
-ozYxD+f5npF5kWWKcLIIo0wqvXg0GOLNfxTh
------END CERTIFICATE-----
-"#;
+ let cert_content = include_str!("./test_certificate.txt");
let expected_thumbprint = "860218AD0A996004449521E2713C28F67B5EA580";
let pem = PemCertificate::from_pem_string(cert_content).expect("Reading PEM failed");
diff --git a/crates/common/certificate/src/test_certificate.txt b/crates/common/certificate/src/test_certificate.txt
new file mode 100644
index 00000000..60cb6b45
--- /dev/null
+++ b/crates/common/certificate/src/test_certificate.txt
@@ -0,0 +1,11 @@
+-----BEGIN CERTIFICATE-----
+MIIBlzCCAT2gAwIBAgIBKjAKBggqhkjOPQQDAjA7MQ8wDQYDVQQDDAZteS10YnIx
+EjAQBgNVBAoMCVRoaW4gRWRnZTEUMBIGA1UECwwLVGVzdCBEZXZpY2UwHhcNMjEw
+MzA5MTQxMDMwWhcNMjIwMzEwMTQxMDMwWjA7MQ8wDQYDVQQDDAZteS10YnIxEjAQ
+BgNVBAoMCVRoaW4gRWRnZTEUMBIGA1UECwwLVGVzdCBEZXZpY2UwWTATBgcqhkjO
+PQIBBggqhkjOPQMBBwNCAAR6DVDOQ9ey3TX4tD2V0zCYe8GtmUHekNZZX6P+lUXx
+886P/Kkyra0xCYKam2me2VzdLMc4X5cpRkybVa0XH/WCozIwMDAdBgNVHQ4EFgQU
+Iz8LzGgzHjqsvB+ppPsVa+xf2bYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQD
+AgNIADBFAiEAhMAATBcZqE3Li1TZCzDoweBxRw1WD6gaSAcrsIWuW94CIHuR5ZG7
+ozYxD+f5npF5kWWKcLIIo0wqvXg0GOLNfxTh
+-----END CERTIFICATE-----
diff --git a/crates/common/tedge_config/src/settings.rs b/crates/common/tedge_config/src/settings.rs
index bca85b1a..aa6fbdb4 100644
--- a/crates/common/tedge_config/src/settings.rs
+++ b/crates/common/tedge_config/src/settings.rs
@@ -102,7 +102,7 @@ impl ConfigSetting for C8yRootCertPathSetting {
}
///
-/// Smartrest templates to subsribe to.
+/// Smartrest templates to subscribe to.
///
/// Example: template1,template2
///
diff --git a/crates/common/tedge_config/src/tedge_config_repository.rs b/crates/common/tedge_config/src/tedge_config_repository.rs
index 894116d8..b305da58 100644
--- a/crates/common/tedge_config/src/tedge_config_repository.rs
+++ b/crates/common/tedge_config/src/tedge_config_repository.rs
@@ -3,7 +3,7 @@ use std::fs;
use std::path::PathBuf;
use tedge_utils::fs::atomically_write_file_sync;
-/// TEdgeConfigRepository is resposible for loading and storing TEdgeConfig entities.
+/// TEdgeConfigRepository is responsible for loading and storing TEdgeConfig entities.
///
#[derive(Debug)]
pub struct TEdgeConfigRepository {
diff --git a/crates/common/tedge_utils/src/file.rs b/crates/common/tedge_utils/src/file.rs
index f3659d56..2ac86314 100644
--- a/crates/common/tedge_utils/src/file.rs
+++ b/crates/common/tedge_utils/src/file.rs
@@ -110,7 +110,7 @@ impl PermissionEntry {
/// If the file already exists, then it will not be re-created and it will not overwrite/append the contents of the file.
/// This method returns
/// Ok() when file is created and the content is written successfully into the file.
- /// Ok() when the file aleady exists
+ /// Ok() when the file already exists
/// Err(_) When it can not create the file with the appropriate owner and access permissions.
fn create_file(&self, file: &Path, default_content: Option<&str>) -> Result<(), FileError> {
match fs::OpenOptions::new()
diff --git a/crates/common/tedge_utils/src/fs_notify.rs b/crates/common/tedge_utils/src/fs_notify.rs
index 6745c180..4c1149b5 100644
--- a/crates/common/tedge_utils/src/fs_notify.rs
+++ b/crates/common/tedge_utils/src/fs_notify.rs
@@ -266,7 +266,7 @@ impl NotifyStream {
match event_or_error {
Ok(event) => {
let event_mask: FileEvent = event.mask.try_into()?;
- // because watching a file or watching a direcotry is implemented as
+ // because watching a file or watching a directory is implemented as
// watching a directory, we can ignore the case where &event.name is None
if let Some(event_name) = &event.name {
let notify_file_name = event_name.to_str().ok_or_else(|| NotifyStreamError::FailedToCreateStream)?;
@@ -316,7 +316,7 @@ impl NotifyStream {
// will always add a watcher as a directory
},
Err(error) => {
- // any error comming out of `notify_service.next()` will be
+ // any error coming out of `notify_service.next()` will be
// an std::Io error: https://docs.rs/inotify/latest/src/inotify/stream.rs.html#48
yield Err(NotifyStreamError::FromIOError(error))?;
}
diff --git a/crates/core/c8y_api/src/http_proxy.rs b/crates/core/c8y_api/src/http_proxy.rs
index 83d9b6bf..d8914eb1 100644
--- a/crates/core/c8y_api/src/http_proxy.rs
+++ b/crates/core/c8y_api/src/http_proxy.rs
@@ -324,7 +324,7 @@ impl C8YHttpProxy for JwtAuthHttpProxy {
while self.end_point.c8y_internal_id.is_empty() {
if let Err(error) = self.try_get_and_set_internal_id().await {
error!(
- "An error ocurred while retrieving internal Id, operation will retry in {} seconds and mapper will reinitialise.\n Error: {:?}",
+ "An error occurred while retrieving internal Id, operation will retry in {} seconds and mapper will reinitialise.\n Error: {:?}",
RETRY_TIMEOUT_SECS, error
);
diff --git a/crates/core/tedge/src/cli/connect/command.rs b/crates/core/tedge/src/cli/connect/command.rs
index c525eb1d..3e2680f9 100644
--- a/crates/core/tedge/src/cli/connect/command.rs
+++ b/crates/core/tedge/src/cli/connect/command.rs
@@ -246,7 +246,7 @@ where
Ok(())
}
-// Check the connection by using the jwt token retrival over the mqtt.
+// Check the connection by using the jwt token retrieval over the mqtt.
// If successful in getting the jwt token '71,xxxxx', the connection is established.
fn check_device_status_c8y(tedge_config: &TEdgeConfig) -> Result<DeviceStatus, ConnectError> {
const C8Y_TOPIC_BUILTIN_JWT_TOKEN_DOWNSTREAM: &str = "c8y/s/dat";
diff --git a/crates/core/tedge/src/system_services/mod.rs b/crates/core/tedge/src/system_services/mod.rs
index 4d80c838..6277be91 100644
--- a/crates/core/tedge/src/system_services/mod.rs
+++ b/crates/core/tedge/src/system_services/mod.rs
@@ -1,7 +1,7 @@
//! Common interface to the system-provided _service management facility_ to start, stop, enable,
//! disable or query the status of system services.
//!
-//! Supported service manangement facilities include:
+//! Supported service management facilities include:
//!
//! * systemd
//! * OpenRC
diff --git a/crates/core/tedge/tests/main.rs b/crates/core/tedge/tests/main.rs
index 0a22c504..107244a0 100644
--- a/crates/core/tedge/tests/main.rs
+++ b/crates/core/tedge/tests/main.rs
@@ -185,7 +185,7 @@ mod tests {
Ok(())
}
- // #[test_case(config key, config vaule, expected unset value)]
+ // #[test_case(config key, config value, expected unset value)]
#[test_case(
"c8y.url",
"mytenant.cumulocity.com",
diff --git a/crates/core/tedge_agent/src/agent.rs b/crates/core/tedge_agent/src/agent.rs
index db18f4ea..e79682eb 100644
--- a/crates/core/tedge_agent/src/agent.rs
+++ b/crates/core/tedge_agent/src/agent.rs
@@ -200,7 +200,7 @@ impl SmAgentConfig {
pub struct SmAgent {
config: SmAgentConfig,
operation_logs: OperationLogs,
- persistance_store: AgentStateRepository,
+ persistence_store: AgentStateRepository,
_flock: Flockfile,
}
@@ -209,7 +209,7 @@ impl SmAgent {
let flock = check_another_instance_is_not_running(name, &config.run_dir)?;
info!("{} starting", &name);
- let persistance_store = AgentStateRepository::new(config.sm_home.clone());
+ let persistence_store = AgentStateRepository::new(config.sm_home.clone());
let operation_logs = OperationLogs::try_new(config.log_dir.clone())?;
config.mqtt_config = config
@@ -220,7 +220,7 @@ impl SmAgent {
Ok(Self {
config,
operation_logs,
- persistance_store,
+ persistence_store,
_flock: flock,
})
}
@@ -342,7 +342,7 @@ impl SmAgent {
{
error!("{}", error);
- self.persistance_store.clear().await?;
+ self.persis