Skip to content

[Actions] Add spell checker #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/_typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[files]
extend-exclude = []

[default.extend-words]
17 changes: 17 additions & 0 deletions .github/workflows/spell-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Spell Check

on:
pull_request:
branches: [ main ]

jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@master
with:
config: ./.github/workflows/_typos.toml
6 changes: 3 additions & 3 deletions daemon/pipeline-dbus-impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @details This implements the pipeline dbus interface.
*/

#include <glib.h>

Check failure on line 17 in daemon/pipeline-dbus-impl.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

daemon/pipeline-dbus-impl.cc:17:10 [clang-diagnostic-error]

'glib.h' file not found
#include <gst/gst.h>
#include <stdbool.h>
#include <stdio.h>
Expand Down Expand Up @@ -220,7 +220,7 @@
g_mutex_unlock (&p->lock);

if (sc_ret == GST_STATE_CHANGE_FAILURE) {
ml_loge ("Failed to set the state of the pipline to PLAYING whose service name is %s.",
ml_loge ("Failed to set the state of the pipeline to PLAYING whose service name is %s.",
p->service_name);
result = -ESTRPIPE;
}
Expand Down Expand Up @@ -256,7 +256,7 @@
g_mutex_unlock (&p->lock);

if (sc_ret == GST_STATE_CHANGE_FAILURE) {
ml_loge ("Failed to set the state of the pipline to PAUSED whose service name is %s.",
ml_loge ("Failed to set the state of the pipeline to PAUSED whose service name is %s.",
p->service_name);
result = -ESTRPIPE;
}
Expand Down Expand Up @@ -337,7 +337,7 @@
g_mutex_unlock (&p->lock);

if (sc_ret == GST_STATE_CHANGE_FAILURE) {
ml_loge ("Failed to get the state of the pipline whose service name is %s.",
ml_loge ("Failed to get the state of the pipeline whose service name is %s.",
p->service_name);
result = -ESTRPIPE;
}
Expand Down
2 changes: 1 addition & 1 deletion packaging/mlops-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
%define enable_test -Denable-test=false
%define install_test -Dinstall-test=false

# To generage gcov package, --define "gcov 1"
# To generate gcov package, --define "gcov 1"
%if 0%{?gcov:1}
%define unit_test 1
%define release_test 1
Expand Down
26 changes: 13 additions & 13 deletions tests/daemon/unittest_service_db.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @bug No known bugs
*/

#include <gtest/gtest.h>

Check failure on line 10 in tests/daemon/unittest_service_db.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

tests/daemon/unittest_service_db.cc:10:10 [clang-diagnostic-error]

'gtest/gtest.h' file not found
#include <gio/gio.h>

#include "log.h"
Expand Down Expand Up @@ -345,9 +345,9 @@
}

/**
* @brief Negative test for set_pipline. DB is not initialized.
* @brief Negative test for set_pipeline. DB is not initialized.
*/
TEST (serviceDBNotInitalized, set_pipeline_n)
TEST (serviceDBNotInitialized, set_pipeline_n)

Check warning on line 350 in tests/daemon/unittest_service_db.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

tests/daemon/unittest_service_db.cc:350:1 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 350 in tests/daemon/unittest_service_db.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

tests/daemon/unittest_service_db.cc:350:30 [readability-named-parameter]

all parameters should be named in a function
{
MLServiceDB db (TEST_DB_PATH);

Expand All @@ -360,9 +360,9 @@
}

/**
* @brief Negative test for get_pipline. DB is not initialized.
* @brief Negative test for get_pipeline. DB is not initialized.
*/
TEST (serviceDBNotInitalized, get_pipeline_n)
TEST (serviceDBNotInitialized, get_pipeline_n)

Check warning on line 365 in tests/daemon/unittest_service_db.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

tests/daemon/unittest_service_db.cc:365:1 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 365 in tests/daemon/unittest_service_db.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

tests/daemon/unittest_service_db.cc:365:30 [readability-named-parameter]

all parameters should be named in a function
{
MLServiceDB db (TEST_DB_PATH);

Expand All @@ -378,7 +378,7 @@
/**
* @brief Negative test for delete_pipeline. DB is not initialized.
*/
TEST (serviceDBNotInitalized, delete_pipeline_n)
TEST (serviceDBNotInitialized, delete_pipeline_n)

Check warning on line 381 in tests/daemon/unittest_service_db.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

tests/daemon/unittest_service_db.cc:381:1 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 381 in tests/daemon/unittest_service_db.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

tests/daemon/unittest_service_db.cc:381:30 [readability-named-parameter]

all parameters should be named in a function
{
MLServiceDB db (TEST_DB_PATH);

Expand All @@ -393,7 +393,7 @@
/**
* @brief Negative test for set_model. DB is not initialized.
*/
TEST (serviceDBNotInitalized, set_model_n)
TEST (serviceDBNotInitialized, set_model_n)

Check warning on line 396 in tests/daemon/unittest_service_db.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

tests/daemon/unittest_service_db.cc:396:1 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 396 in tests/daemon/unittest_service_db.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

tests/daemon/unittest_service_db.cc:396:30 [readability-named-parameter]

all parameters should be named in a function
{
MLServiceDB db (TEST_DB_PATH);

Expand All @@ -409,7 +409,7 @@
/**
* @brief Negative test for update_model_description. DB is not initialized.
*/
TEST (serviceDBNotInitalized, update_model_description_n)
TEST (serviceDBNotInitialized, update_model_description_n)

Check warning on line 412 in tests/daemon/unittest_service_db.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

tests/daemon/unittest_service_db.cc:412:1 [modernize-use-trailing-return-type]

use a trailing return type for this function

Check warning on line 412 in tests/daemon/unittest_service_db.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

tests/daemon/unittest_service_db.cc:412:30 [readability-named-parameter]

all parameters should be named in a function
{
MLServiceDB db (TEST_DB_PATH);

Expand All @@ -424,7 +424,7 @@
/**
* @brief Negative test for activate_model. DB is not initialized.
*/
TEST (serviceDBNotInitalized, activate_model_n)
TEST (serviceDBNotInitialized, activate_model_n)
{
MLServiceDB db (TEST_DB_PATH);

Expand All @@ -439,7 +439,7 @@
/**
* @brief Negative test for get_model. DB is not initialized.
*/
TEST (serviceDBNotInitalized, get_model_n)
TEST (serviceDBNotInitialized, get_model_n)
{
MLServiceDB db (TEST_DB_PATH);

Expand All @@ -455,7 +455,7 @@
/**
* @brief Negative test for delete_model. DB is not initialized.
*/
TEST (serviceDBNotInitalized, delete_model_n)
TEST (serviceDBNotInitialized, delete_model_n)
{
MLServiceDB db (TEST_DB_PATH);

Expand Down Expand Up @@ -632,7 +632,7 @@
/**
* @brief Negative test for set_resource. DB is not initialized.
*/
TEST (serviceDBNotInitalized, set_resource_n)
TEST (serviceDBNotInitialized, set_resource_n)
{
MLServiceDB db (TEST_DB_PATH);

Expand All @@ -647,7 +647,7 @@
/**
* @brief Negative test for get_resource. DB is not initialized.
*/
TEST (serviceDBNotInitalized, get_resource_n)
TEST (serviceDBNotInitialized, get_resource_n)
{
MLServiceDB db (TEST_DB_PATH);

Expand All @@ -663,7 +663,7 @@
/**
* @brief Negative test for delete_resource. DB is not initialized.
*/
TEST (serviceDBNotInitalized, delete_resource_n)
TEST (serviceDBNotInitialized, delete_resource_n)
{
MLServiceDB db (TEST_DB_PATH);

Expand Down
2 changes: 1 addition & 1 deletion tests/plugin-parser/unittest_mlops_plugin_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* and test fixtures, and implements the unit tests using gtest and gmock.The mock class are
* used to simulate the behavior of the pkgmgr-info class, which is used by the plugin parser.
*/
#include <glib.h>

Check failure on line 18 in tests/plugin-parser/unittest_mlops_plugin_parser.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

tests/plugin-parser/unittest_mlops_plugin_parser.cc:18:10 [clang-diagnostic-error]

'glib.h' file not found
#include <gmodule.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
Expand Down Expand Up @@ -116,7 +116,7 @@
}

/**
* @brief pluging-parser test fixture
* @brief plugin-parser test fixture
*/
class PkgMgrInfoMockTestFixture : public ::testing::Test
{
Expand Down