Visitar URL original
Fix typos discovered by codespell · cpplint/cpplint@1f47e13 · GitHub
Skip to content

Commit 1f47e13

Browse files
committed
Fix typos discovered by codespell
1 parent fd77bc0 commit 1f47e13

7 files changed

Lines changed: 19 additions & 19 deletions

File tree

‎CHANGELOG.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ A large long-overdue modernization of the codebase!
4343
* `build/class` and `build/namespaces` no longer check for whether a namespace or class has a closing brace from @geoffviola (https://github.com/cpplint/cpplint/pull/272). This should be done in a more efficient manner by a compiler or language server instead. As part of this, the `build/class` category was removed.
4444
* Fixed false positive when an if/else statement has braces everywhere but one of the closing braces before the final block is on a separate line by @aaronliu0130 (https://github.com/cpplint/cpplint/pull/265)
4545
* For header files, the check for a header guard's name will now be cached and only run once, as opposed to previously being run on every line. This results in a ~5.6% reduction in run time thanks to @matyalatte, who figured it out, and @aaronliu0130 for implementing it (https://github.com/cpplint/cpplint/pull/291)
46-
* Usages of the deprecated sre_compile were refectored by @jspricke (https://github.com/cpplint/cpplint/pull/214)
46+
* Usages of the deprecated sre_compile were refactored by @jspricke (https://github.com/cpplint/cpplint/pull/214)
4747
* Usages of deprecated unittest aliases were refactored by @tirkarthi (https://github.com/cpplint/cpplint/pull/182), @aaronliu0130 and @jayvdb
4848
* Typos in this changelog, comments and functions were fixed by @jayvdb (https://github.com/cpplint/cpplint/pull/245), @aaronliu0130 and @tkruse
4949
* %-strings were modernized into f-strings by @aaronliu0130

‎cpplint.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5255,7 +5255,7 @@ def _GetTextInside(text, start_pattern):
52555255
Given a string of lines and a regular expression string, retrieve all the text
52565256
following the expression and between opening punctuation symbols like
52575257
(, [, or {, and the matching close-punctuation symbol. This properly nested
5258-
occurrences of the punctuations, so for the text like
5258+
occurrences of the punctuation, so for the text like
52595259
printf(a(), b(c()));
52605260
a call to _GetTextInside(text, r'printf\(') will return 'a(), b(c())'.
52615261
start_pattern must match string having an open punctuation symbol at the end.
@@ -5272,7 +5272,7 @@ def _GetTextInside(text, start_pattern):
52725272
# TODO(unknown): Audit cpplint.py to see what places could be profitably
52735273
# rewritten to use _GetTextInside (and use inferior regexp matching today).
52745274

5275-
# Give opening punctuations to get the matching close-punctuations.
5275+
# Give opening punctuation to get the matching close-punctuation.
52765276
matching_punctuation = {'(': ')', '{': '}', '[': ']'}
52775277
closing_punctuation = set(dict.values(matching_punctuation))
52785278

@@ -5286,22 +5286,22 @@ def _GetTextInside(text, start_pattern):
52865286
'start_pattern must ends with an opening punctuation.')
52875287
assert text[start_position - 1] in matching_punctuation, (
52885288
'start_pattern must ends with an opening punctuation.')
5289-
# Stack of closing punctuations we expect to have in text after position.
5289+
# Stack of closing punctuation we expect to have in text after position.
52905290
punctuation_stack = [matching_punctuation[text[start_position - 1]]]
52915291
position = start_position
52925292
while punctuation_stack and position < len(text):
52935293
if text[position] == punctuation_stack[-1]:
52945294
punctuation_stack.pop()
52955295
elif text[position] in closing_punctuation:
5296-
# A closing punctuation without matching opening punctuations.
5296+
# A closing punctuation without matching opening punctuation.
52975297
return None
52985298
elif text[position] in matching_punctuation:
52995299
punctuation_stack.append(matching_punctuation[text[position]])
53005300
position += 1
53015301
if punctuation_stack:
5302-
# Opening punctuations left without matching close-punctuations.
5302+
# Opening punctuation left without matching close-punctuation.
53035303
return None
5304-
# punctuations match.
5304+
# punctuation match.
53055305
return text[start_position:position - 1]
53065306

53075307

‎samples/boost-sample/include/boost/math/octonion.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ namespace boost
925925

926926
// There is quite a lot of repetition in the code below. This is intentional.
927927
// The last conditional block is the normal form, and the others merely
928-
// consist of workarounds for various compiler deficiencies. Hopefuly, when
928+
// consist of workarounds for various compiler deficiencies. Hopefully, when
929929
// more compilers are conformant and we can retire support for those that are
930930
// not, we will be able to remove the clutter. This is makes the situation
931931
// (painfully) explicit.
@@ -3970,7 +3970,7 @@ namespace boost
39703970
#undef BOOST_OCTONION_VALARRAY_LOADER
39713971

39723972

3973-
// Note: This is the Cayley norm, not the Euclidian norm...
3973+
// Note: This is the Cayley norm, not the Euclidean norm...
39743974

39753975
template<typename T>
39763976
inline T norm(octonion<T> const & o)

‎samples/chromium-sample/src/chrome_content_renderer_client.cc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,12 +1194,12 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
11941194
#endif // BUILDFLAG(ENABLE_PLUGINS)
11951195

11961196
// For NaCl content handling plugins, the NaCl manifest is stored in an
1197-
// additonal 'nacl' param associated with the MIME type.
1197+
// additional 'nacl' param associated with the MIME type.
11981198
// static
11991199
GURL ChromeContentRendererClient::GetNaClContentHandlerURL(
12001200
const std::string& actual_mime_type,
12011201
const content::WebPluginInfo& plugin) {
1202-
// Look for the manifest URL among the MIME type's additonal parameters.
1202+
// Look for the manifest URL among the MIME type's additional parameters.
12031203
for (const auto& mime_type : plugin.mime_types) {
12041204
if (mime_type.mime_type == actual_mime_type) {
12051205
for (const auto& p : mime_type.additional_params) {

‎samples/codelite-sample/src/pptable.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void PPToken::processArgs(const wxString &argsList)
155155
{
156156
args = wxStringTokenize(argsList, wxT(","), wxTOKEN_STRTOK);
157157

158-
// replace all occurances of 'arg' with %1, %2 etc
158+
// replace all occurrences of 'arg' with %1, %2 etc
159159
for(size_t i=0; i<args.GetCount(); i++) {
160160
wxString replaceWith = wxString::Format(wxT("%%%d"), (int)i);
161161
#if wxVERSION_NUMBER < 2900
@@ -511,7 +511,7 @@ wxString PPTable::Export()
511511

512512
} else {
513513
// macros with replacement but they are not in a form of a function
514-
// we take only macros that thier replacement is not a number
514+
// we take only macros that their replacement is not a number
515515
long v(-1);
516516
if(!replacement.ToLong(&v) && !replacement.ToLong(&v, 8) && !replacement.ToLong(&v, 16) && replacement.find(wxT('"')) == wxString::npos && !replacement.StartsWith(wxT("0x"))) {
517517
table << iter->second.fullname() << wxT("=") << replacement << wxT("\n");

‎samples/protobuf-sample/src/descriptor_unittest.cc‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ TEST_F(FileDescriptorTest, FindExtensionByNumber) {
419419
}
420420

421421
TEST_F(FileDescriptorTest, BuildAgain) {
422-
// Test that if te call BuildFile again on the same input we get the same
422+
// Test that if the call BuildFile again on the same input we get the same
423423
// FileDescriptor back.
424424
FileDescriptorProto file;
425425
foo_file_->CopyTo(&file);
@@ -431,7 +431,7 @@ TEST_F(FileDescriptorTest, BuildAgain) {
431431
}
432432

433433
TEST_F(FileDescriptorTest, BuildAgainWithSyntax) {
434-
// Test that if te call BuildFile again on the same input we get the same
434+
// Test that if the call BuildFile again on the same input we get the same
435435
// FileDescriptor back even if syntax param is specified.
436436
FileDescriptorProto proto_syntax2;
437437
proto_syntax2.set_name("foo_syntax2");
@@ -2251,7 +2251,7 @@ TEST_F(MiscTest, DefaultValues) {
22512251
AddField(message_proto, "empty_string", 11, label, FD::TYPE_STRING)
22522252
->set_default_value("");
22532253

2254-
// Add a second set of fields with implicit defalut values.
2254+
// Add a second set of fields with implicit default values.
22552255
AddField(message_proto, "implicit_int32" , 21, label, FD::TYPE_INT32 );
22562256
AddField(message_proto, "implicit_int64" , 22, label, FD::TYPE_INT64 );
22572257
AddField(message_proto, "implicit_uint32", 23, label, FD::TYPE_UINT32);
@@ -4647,7 +4647,7 @@ TEST_F(ValidationErrorTest, RepeatedMessageOption) {
46474647
}
46484648

46494649
TEST_F(ValidationErrorTest, ResolveUndefinedOption) {
4650-
// The following should produce an eror that baz.bar is resolved but not
4650+
// The following should produce an error that baz.bar is resolved but not
46514651
// defined.
46524652
// foo.proto:
46534653
// package baz

‎samples/v8-sample/src/interface-descriptors.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ class V8_EXPORT_PRIVATE CallInterfaceDescriptorData {
180180
RegList allocatable_registers_ = 0;
181181

182182
// |registers_params_| defines registers that are used for parameter passing.
183-
// |machine_types_| defines machine types for resulting values and incomping
183+
// |machine_types_| defines machine types for resulting values and incoming
184184
// parameters.
185185
// Both arrays are allocated dynamically by the InterfaceDescriptor and
186186
// freed on destruction. This is because static arrays cause creation of
@@ -945,7 +945,7 @@ class BinaryOpDescriptor : public CallInterfaceDescriptor {
945945
DECLARE_DESCRIPTOR(BinaryOpDescriptor, CallInterfaceDescriptor)
946946
};
947947

948-
// This desciptor is shared among String.p.charAt/charCodeAt/codePointAt
948+
// This descriptor is shared among String.p.charAt/charCodeAt/codePointAt
949949
// as they all have the same interface.
950950
class StringAtDescriptor final : public CallInterfaceDescriptor {
951951
public:

0 commit comments

Comments
 (0)