Skip to content

Commit c4b93cf

Browse files
Added codespell as a pre-commit hook. (BehaviorTree#977)
Signed-off-by: Leander Stephen D'Souza <[email protected]>
1 parent 7ffab7e commit c4b93cf

32 files changed

+74
-55
lines changed

.codespell_ignore_words

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
INOUT
2+
InOut
3+
delimeter
4+
Succesful
5+
worl
6+
valu
7+
Exeption

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,13 @@ repos:
4242
hooks:
4343
- id: clang-format
4444
args: ['-fallback-style=none', '-i']
45+
46+
# Spell check
47+
- repo: https://github.com/codespell-project/codespell
48+
rev: v2.4.1
49+
hooks:
50+
- id: codespell
51+
additional_dependencies:
52+
- tomli
53+
args:
54+
[--toml=./pyproject.toml]

CHANGELOG.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Changelog for package behaviortree_cpp
1717
* Fix dangling‐capture in TestNodeConfig
1818
* Fix Precondition to only check condition once (`#904 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/904>`_)
1919
* fix issue 945
20-
* extend JSON convertion to include vectors (`#965 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/965>`_)
20+
* extend JSON conversion to include vectors (`#965 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/965>`_)
2121
* Fix CI, add BUILD_TESTS and remove catkin support
2222
* Fix testing CMake issue to resolve Rolling regression (`#961 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/961>`_)
2323
* Bug fix/set blackboard (`#955 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/955>`_)
@@ -116,7 +116,7 @@ Changelog for package behaviortree_cpp
116116
* warn about overwritten enums
117117
* fix ambiguous to_json
118118
* Extend unit test for blackboard backup to run the second tree (`#789 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/789>`_)
119-
* json convertion changed and
119+
* json conversion changed and
120120
* issue `#755 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/755>`_ : add backchaining test and change reactive nodes checks (`#770 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/770>`_)
121121
* Update switch_node.h
122122
* test moved and port remapping fixed
@@ -393,7 +393,7 @@ Changelog for package behaviortree_cpp
393393
* better include paths
394394
* Control node and Decorators RUNNING before first child
395395
* blackboard: update getKeys and add mutex to scripting
396-
* add [[nodiscard]] and some othe minor changes
396+
* add [[nodiscard]] and some other minor changes
397397
* add screenshot
398398
* change the behavior of tickOnce to actually loop is wake up signal is… (`#522 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/522>`_)
399399
* change the behavior of tickOnce to actually loop is wake up signal is received
@@ -492,7 +492,7 @@ Changelog for package behaviortree_cpp
492492
dependency explicitly.
493493
* Change order of lock to prevent deadlock. (`#368 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/368>`_)
494494
Resolves `#367 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/367>`_.
495-
* Fix `#320 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/320>`_ : forbit refrences in Any
495+
* Fix `#320 <https://github.com/BehaviorTree/BehaviorTree.CPP/issues/320>`_ : forbid references in Any
496496
* Update action_node.h
497497
* Contributors: Adam Sasine, Davide Faconti, Fabian Schurig, Griswald Brooks, Hyeongsik Min, Robodrome, imgbot[bot], panwauu
498498

@@ -839,9 +839,9 @@ Changelog for package behaviortree_cpp
839839
* Conan package distribution (#39)
840840
* Non-functional refactoring of xml_parsing to clean up the code
841841
* cosmetic changes in the code of BehaviorTreeFactory
842-
* XML schema. Related to enchancement #40
842+
* XML schema. Related to enhancement #40
843843
* call setRegistrationName() for built-in Nodes
844-
The methos is called by BehaviorTreefactory, therefore it
844+
The method is called by BehaviorTreefactory, therefore it
845845
registrationName is empty if trees are created programmatically.
846846
* Reset reference count when destroying logger (issue #38)
847847
* Contributors: Davide Facont, Davide Faconti, Uilian Ries
@@ -857,7 +857,7 @@ Changelog for package behaviortree_cpp
857857
------------------
858858
* adding virtual TreeNode::onInit() [issue #33]
859859
* fix issue #34 : if you don't implement convertFromString, it will compile but it may throw
860-
* Pretty demangled names and obsolate comments removed
860+
* Pretty demangled names and obsolete comments removed
861861
* bug fixes
862862
* more comments
863863
* [enhancement #32]: add CoroActionNode and rename ActionNode as "AsynActionNode"
@@ -924,7 +924,7 @@ Changelog for package behaviortree_cpp
924924
* Fix: registerBuilder did not register the manifest. It was "broken" as public API method
925925
* Use the Pimpl idiom to hide zmq from the header file
926926
* move header of minitrace in the cpp file
927-
* Fixed a crash occuring when you didn't initialized a Tree object (#20)
927+
* Fixed a crash occurring when you didn't initialized a Tree object (#20)
928928
* Fix issue #16
929929
* add ParallelNode to pre-registered entries in factory (issue #13)
930930
* removed M_PI

cmake/conan.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ macro(_conan_check_language)
116116
set(LANGUAGE C)
117117
set(USING_CXX 0)
118118
else ()
119-
message(FATAL_ERROR "Conan: Neither C or C++ was detected as a language for the project. Unabled to detect compiler version.")
119+
message(FATAL_ERROR "Conan: Neither C or C++ was detected as a language for the project. Unable to detect compiler version.")
120120
endif()
121121
endmacro()
122122

@@ -1050,7 +1050,7 @@ macro(conan_config_install)
10501050
endif()
10511051

10521052
if(DEFINED CONAN_ARGS)
1053-
# Convert ; seperated multi arg list into space seperated string
1053+
# Convert ; separated multi arg list into space separated string
10541054
string(REPLACE ";" " " l_CONAN_ARGS "${CONAN_ARGS}")
10551055
set(CONAN_ARGS_ARGS "--args=${l_CONAN_ARGS}")
10561056
endif()

examples/t12_default_ports.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct Point2D
2222
}
2323
};
2424

25-
// Allow bi-directional convertion to JSON
25+
// Allow bi-directional conversion to JSON
2626
BT_JSON_CONVERTER(Point2D, point)
2727
{
2828
add_field("x", &point.x);

examples/t15_nodes_mocking.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ int main(int argc, char** argv)
147147
factory.loadSubstitutionRuleFromJSON(json_text);
148148
}
149149
//---------------------------------------------------------------
150-
// IMPORTANT: all substiutions must be done BEFORE creating the tree
150+
// IMPORTANT: all substitutions must be done BEFORE creating the tree
151151
// During the construction phase of the tree, the substitution
152152
// rules will be used to instantiate the test nodes, instead of the
153153
// original ones.
@@ -158,7 +158,7 @@ int main(int argc, char** argv)
158158
return 0;
159159
}
160160

161-
/* Expecte output:
161+
/* Expected output:
162162
163163
----- Nodes fullPath() -------
164164
Sequence::1

examples/t16_global_blackboard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ int main()
9797
return 0;
9898
}
9999

100-
/* Expecte output:
100+
/* Expected output:
101101
102102
[main_print] val: 1
103103
[sub_print] val: 1

include/behaviortree_cpp/action_node.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ class SimpleActionNode : public SyncActionNode
9999
* IMPORTANT: this action is quite hard to implement correctly.
100100
* Please make sure that you know what you are doing.
101101
*
102-
* - In your overriden tick() method, you must check periodically
102+
* - In your overridden tick() method, you must check periodically
103103
* the result of the method isHaltRequested() and stop your execution accordingly.
104104
*
105-
* - in the overriden halt() method, you can do some cleanup, but do not forget to
105+
* - in the overridden halt() method, you can do some cleanup, but do not forget to
106106
* invoke the base class method ThreadedAction::halt();
107107
*
108108
* - remember, with few exceptions, a halted ThreadedAction must return NodeStatus::IDLE.

include/behaviortree_cpp/actions/pop_from_queue.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/**
2121
* Template Action used in ex04_waypoints.cpp example.
2222
*
23-
* Its purpose is to do make it easy to create while loops wich consume the elements of a queue.
23+
* Its purpose is to do make it easy to create while loops which consume the elements of a queue.
2424
*
2525
* Note that modifying the queue is not thread safe, therefore the action that creates the queue
2626
* or push elements into it, must be Synchronous.
@@ -47,7 +47,7 @@ struct ProtectedQueue
4747
*
4848
* We avoid this using reference semantic (wrapping the object in a shared_ptr).
4949
* Unfortunately, remember that this makes our access to the list not thread-safe!
50-
* This is the reason why we add a mutex to be used when modyfying the ProtectedQueue::items
50+
* This is the reason why we add a mutex to be used when modifying the ProtectedQueue::items
5151
*
5252
* */
5353

@@ -95,7 +95,7 @@ class PopFromQueue : public SyncActionNode
9595
};
9696

9797
/**
98-
* Get the size of a queue. Usefull is you want to write something like:
98+
* Get the size of a queue. Useful when you want to write something like:
9999
*
100100
* <QueueSize queue="{waypoints}" size="{wp_size}" />
101101
* <Repeat num_cycles="{wp_size}" >

include/behaviortree_cpp/actions/set_blackboard_node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class SetBlackboardNode : public SyncActionNode
4444

4545
static PortsList providedPorts()
4646
{
47-
return { InputPort("value", "Value to be written int othe output_key"),
47+
return { InputPort("value", "Value to be written into the output_key"),
4848
BidirectionalPort("output_key", "Name of the blackboard entry where the "
4949
"value should be written") };
5050
}

0 commit comments

Comments
 (0)