From 7d164316a42f22bb39a31d114d006a8d05bb7f9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ville=20Skytt=C3=A4?= Date: Tue, 13 Apr 2021 16:59:55 +0300 Subject: [PATCH] docs: doc and comment spelling fixes --- bin/perltidy | 10 +++++----- dev-bin/RandomTesting.md | 2 +- docs/BugLog.html | 24 ++++++++++++------------ docs/perltidy.html | 8 ++++---- lib/Perl/Tidy/Formatter.pm | 8 ++++---- lib/Perl/Tidy/Tokenizer.pm | 4 ++-- local-docs/BugLog.pod | 24 ++++++++++++------------ t/snippets/align20.in | 2 +- t/snippets/align24.in | 2 +- t/snippets/expect/align20.def | 2 +- t/snippets/expect/align24.def | 2 +- t/snippets/make_t.pl | 2 +- t/snippets/perltidy_common_flags.pl | 2 +- t/snippets13.t | 8 ++++---- 14 files changed, 50 insertions(+), 50 deletions(-) diff --git a/bin/perltidy b/bin/perltidy index 142c0960..1fd82a7e 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -500,7 +500,7 @@ This flag causes one leading tab character to be inserted for each level of indentation. Certain other features are incompatible with this option, and if these options are also given, then a warning message will be issued and this flag will be unset. One example is the B<-lp> -option. This flag is retained for backwards compatability, but +option. This flag is retained for backwards compatibility, but if you use tabs, the B<-et=n> flag is recommended. =item B<-dt=n>, B<--default-tabsize=n> @@ -749,7 +749,7 @@ number of spaces assigned to a full indentation level on the B<-i=n> command, or This flag allows perltidy to use some improvements which have been made to its indentation model. One of the things it does is "extend" continuation indentation deeper into structures, hence the name. The improved indentation -is particularly noticable when the flags B<-ci=n> and B<-i=n> use the same value of +is particularly noticeable when the flags B<-ci=n> and B<-i=n> use the same value of B. There are no significant disadvantages to using this flag, but to avoid disturbing existing formatting the default is not to use it, B<-nxci>. @@ -865,7 +865,7 @@ The only required piece of information is a container type, which is one of -lpxl='[ {' means do B include use -lp formatting within square-bracets or braces. The only unspecified -container is '(', so this string means that only the contens within parens will use -lp indentation. +container is '(', so this string means that only the contents within parens will use -lp indentation. An optional numeric code may follow any of the container types to further refine the selection based on container contents. The numeric codes are: @@ -1301,7 +1301,7 @@ which shows that B is type B (keyword) and $foo is type B. Despite these precautions, it is still possible to introduce syntax errors with some asymmetric whitespace rules, particularly when call parameters are not -placed in containg parens or braces. For example, the following two lines will +placed in containing parens or braces. For example, the following two lines will be parsed by perl without a syntax error: # original programming, syntax ok @@ -2659,7 +2659,7 @@ Here are some additional example strings and their meanings: '^K(' - exclude a leading paren preceded by a non-keyword '.k(' - exclude a secondary paren preceded by a keyword '[ {' - exclude all brackets and braces - '[ ( ^K{' - exclude everthing except nested structures like do {{ ... }} + '[ ( ^K{' - exclude everything except nested structures like do {{ ... }} =item B of non-block curly braces, parentheses, and square brackets. diff --git a/dev-bin/RandomTesting.md b/dev-bin/RandomTesting.md index bfe8b7e1..0de9be30 100644 --- a/dev-bin/RandomTesting.md +++ b/dev-bin/RandomTesting.md @@ -152,7 +152,7 @@ which may be helpful. But most problems and issues identified by the script are not actual problems with perltidy, so going through these results can take some time. -For example, you might have a random script which has a line begining with +For example, you might have a random script which has a line beginning with ```=txt```, so perl will take that as the start of pod. Then if the flag to delete pod is set, the output file will be truncated and this could trigger a warning that the output file looks too short. diff --git a/docs/BugLog.html b/docs/BugLog.html index 5d7922de..eb46caba 100644 --- a/docs/BugLog.html +++ b/docs/BugLog.html @@ -137,7 +137,7 @@
Fix definition of list within list for -bbx flags
-

Testing produced a blinking state involving a -bbx=2 flag with an unusual combination of other parameters. The problem was traced to the definition of a list containg another list being too restrictive. This update fixes case 1024.

+

Testing produced a blinking state involving a -bbx=2 flag with an unusual combination of other parameters. The problem was traced to the definition of a list containing another list being too restrictive. This update fixes case 1024.

17 Mar 2021, 7f5da0a.

@@ -286,7 +286,7 @@
Fix issue git#54 involving -bbp=n and -bbpi=n
-

In this issue, different results were obtained depending upon the existance of a comma in a list. To fix this, the definition of a list was adjusted from requiring one or more commas to requiring either a fat comma or a comma.

+

In this issue, different results were obtained depending upon the existence of a comma in a list. To fix this, the definition of a list was adjusted from requiring one or more commas to requiring either a fat comma or a comma.

At the same time, a known problem involving the combination -lp -bbp=n -bbpi=n was fixed. This fixes cases b826 b909 b989.

@@ -408,7 +408,7 @@

The previous update was found to occasionally needlessly change existing formatting with very long long lines. So it is restricted to just when -vmll is set. For example, it is ok to keep the long quote following the opening paren in the following case.

  # perltidy -gnu
-  ok( "got to the end without dieing (note without DEBUGGING passing this test means nothing)"
+  ok( "got to the end without dying (note without DEBUGGING passing this test means nothing)"
     );

26 Feb 2021, 2b88464.

@@ -543,7 +543,7 @@
Avoid line breaks after token type 'G'
-

Random testing whith very short maximum line lengths produced some blinking states which were traced to the tokenizer alternately parsed an unknown bareword as type 'w' or type 'G', depending on whether or not an opening block brace immediately followed on the same line. To fix this, a rule was added which prevents a line break between a type 'G' token and an opening code block brace.

+

Random testing with very short maximum line lengths produced some blinking states which were traced to the tokenizer alternately parsed an unknown bareword as type 'w' or type 'G', depending on whether or not an opening block brace immediately followed on the same line. To fix this, a rule was added which prevents a line break between a type 'G' token and an opening code block brace.

This update fixes these cases: b900 b902 b928 b929

@@ -934,7 +934,7 @@ ) } -

were occuring with the following particular parameter set

+

were occurring with the following particular parameter set

    --weld-nested-containers
     --maximum-line-length=40
@@ -1011,7 +1011,7 @@
     --indent-columns=9
     --continuation-indentation=1
-

The problem was that the token 'FILE' was either parsed as type 'Y' or 'Z' depending on the existance of a subsequent space. These have different line break rules, causing a blinker. The problem was fixed by modifying the tokenizer to consider a newline to be a space. Updated 16 Jan 2021, d40cca9.

+

The problem was that the token 'FILE' was either parsed as type 'Y' or 'Z' depending on the existence of a subsequent space. These have different line break rules, causing a blinker. The problem was fixed by modifying the tokenizer to consider a newline to be a space. Updated 16 Jan 2021, d40cca9.

Turn off -bli if -bar is set
@@ -1231,7 +1231,7 @@
Improve rule for forgetting last side comment location
-

The code which aligns side comments remembers the most recent side comment and in some cases tries to start aligning at that column for later side comments. Sometimes the old side comment column was being remembered too long, causing occasional poor formatting and causing a noticable and unexpected drift of side comment locations to the right. The rule for forgetting the previous side comment column has been modified to reduce this problem. The new rule is essentially to forget the previous side comment location at a new side comment with different indentation level or significant number of lines without side comments (about 12). The previous implementation forgetting changes in indentation level across code blocks only. Below is an example where the old method gets into trouble and the new method is ok:

+

The code which aligns side comments remembers the most recent side comment and in some cases tries to start aligning at that column for later side comments. Sometimes the old side comment column was being remembered too long, causing occasional poor formatting and causing a noticeable and unexpected drift of side comment locations to the right. The rule for forgetting the previous side comment column has been modified to reduce this problem. The new rule is essentially to forget the previous side comment location at a new side comment with different indentation level or significant number of lines without side comments (about 12). The previous implementation forgetting changes in indentation level across code blocks only. Below is an example where the old method gets into trouble and the new method is ok:

        # OLD:
         foreach my $r (@$array) {
@@ -1702,7 +1702,7 @@
 
Improve vertical alignment in some marginal matches
-

In perltidy a 'marginal match' occurs for example when two lines share some alignment tokens but are somewhat different. When this happens some limits are placed on the size of the padding spaces that can be introduced. In this update the amount of allowed padding is significatly increased for certain 'good' alignment tokens. Results of extensive testing were favorable provided that the change is restricted to alignments of '=', 'if' and 'unless'. Update made 10 Dec 2020, a585f0b.

+

In perltidy a 'marginal match' occurs for example when two lines share some alignment tokens but are somewhat different. When this happens some limits are placed on the size of the padding spaces that can be introduced. In this update the amount of allowed padding is significantly increased for certain 'good' alignment tokens. Results of extensive testing were favorable provided that the change is restricted to alignments of '=', 'if' and 'unless'. Update made 10 Dec 2020, a585f0b.

    # OLD
     my @roles = $self->role_names;
@@ -2172,7 +2172,7 @@
         }, on_exit => sub ( $worker, $status ) { return; },
     );
-

Notice that the break after the comma has been lost. The problem was traced to a short-cut taken by the code looking for one-line blocks. The unique circumstances in which this occured involved a hash of anonymous subs, one with a signature with multiple parameters and short enough to be a one-line block, as in the last sub definition line. This was fixed 17 Oct 2020 in 'fix missing line break for hash of subs with signatures', 51428db.

+

Notice that the break after the comma has been lost. The problem was traced to a short-cut taken by the code looking for one-line blocks. The unique circumstances in which this occurred involved a hash of anonymous subs, one with a signature with multiple parameters and short enough to be a one-line block, as in the last sub definition line. This was fixed 17 Oct 2020 in 'fix missing line break for hash of subs with signatures', 51428db.

fix issues with prototype and signature parsing
@@ -2336,7 +2336,7 @@
fix incorrect parsing of certain deprecated empty here-docs
-

The following snippet was being incorrecly parsed:

+

The following snippet was being incorrectly parsed:

 print <<
  # Hello World 13!
@@ -2591,7 +2591,7 @@
 
crash due to bad index named '$j_terminal_match'
-

This crash was due to an index error which caused a non-existant object to be referenced. The problem is fixed 2020-09-07 in "fix problem of undefined values involving j_terminal_match", c5bfa77. The particular parameters which caused this were:

+

This crash was due to an index error which caused a non-existent object to be referenced. The problem is fixed 2020-09-07 in "fix problem of undefined values involving j_terminal_match", c5bfa77. The particular parameters which caused this were:

    --noadd-newlines --nowant-left-space='=' 
@@ -2695,7 +2695,7 @@
  use Test::More;
   ok open($stdin, "<&", $1), 'open ... "<&", $magical_fileno', ||  _diag $!;
-

Note the unusual situation of a comma followed by an '||'. Perltidy will format this satisfactorally but it will write an error message. The syntax is correct, however. Perl knows the prototype of the 'ok' function, which is called here without parens, so the last comma marks the last arg and is needed to keep the || from attaching to the last arg.

+

Note the unusual situation of a comma followed by an '||'. Perltidy will format this satisfactorily but it will write an error message. The syntax is correct, however. Perl knows the prototype of the 'ok' function, which is called here without parens, so the last comma marks the last arg and is needed to keep the || from attaching to the last arg.

Full support of peren-less calls will probably never be implemented in perltidy because it would require that it parse all of the modules used to find the prototypes. This would make it impossible to run perltidy on small snippets of code from within an editor.

diff --git a/docs/perltidy.html b/docs/perltidy.html index 2bd042cf..d6f0f51f 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -411,7 +411,7 @@
-t, --tabs
-

This flag causes one leading tab character to be inserted for each level of indentation. Certain other features are incompatible with this option, and if these options are also given, then a warning message will be issued and this flag will be unset. One example is the -lp option. This flag is retained for backwards compatability, but if you use tabs, the -et=n flag is recommended.

+

This flag causes one leading tab character to be inserted for each level of indentation. Certain other features are incompatible with this option, and if these options are also given, then a warning message will be issued and this flag will be unset. One example is the -lp option. This flag is retained for backwards compatibility, but if you use tabs, the -et=n flag is recommended.

-dt=n, --default-tabsize=n
@@ -572,7 +572,7 @@
-xci, --extended-continuation-indentation
-

This flag allows perltidy to use some improvements which have been made to its indentation model. One of the things it does is "extend" continuation indentation deeper into structures, hence the name. The improved indentation is particularly noticable when the flags -ci=n and -i=n use the same value of n. There are no significant disadvantages to using this flag, but to avoid disturbing existing formatting the default is not to use it, -nxci.

+

This flag allows perltidy to use some improvements which have been made to its indentation model. One of the things it does is "extend" continuation indentation deeper into structures, hence the name. The improved indentation is particularly noticeable when the flags -ci=n and -i=n use the same value of n. There are no significant disadvantages to using this flag, but to avoid disturbing existing formatting the default is not to use it, -nxci.

Please see the section "-pbp, --perl-best-practices" for an example of how this flag can improve the formatting of ternary statements. It can also improve indentation of some multi-line qw lists as shown below.

@@ -652,7 +652,7 @@
  -lpxl='[ {'
-

means do NOT include use -lp formatting within square-bracets or braces. The only unspecified container is '(', so this string means that only the contens within parens will use -lp indentation.

+

means do NOT include use -lp formatting within square-bracets or braces. The only unspecified container is '(', so this string means that only the contents within parens will use -lp indentation.

An optional numeric code may follow any of the container types to further refine the selection based on container contents. The numeric codes are:

@@ -999,7 +999,7 @@
Note2: Perltidy's whitespace rules are not perfect
-

Despite these precautions, it is still possible to introduce syntax errors with some asymmetric whitespace rules, particularly when call parameters are not placed in containg parens or braces. For example, the following two lines will be parsed by perl without a syntax error:

+

Despite these precautions, it is still possible to introduce syntax errors with some asymmetric whitespace rules, particularly when call parameters are not placed in containing parens or braces. For example, the following two lines will be parsed by perl without a syntax error:

  # original programming, syntax ok
   my @newkeys = map $_-$nrecs+@data, @oldkeys;
diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm
index 0b448d87..a273e9f8 100644
--- a/lib/Perl/Tidy/Formatter.pm
+++ b/lib/Perl/Tidy/Formatter.pm
@@ -7963,7 +7963,7 @@ sub mark_short_nested_blocks {
     #   sub cxt_two { sort { $a <=> $b } test_if_list() }
 
     # The 'sort' block is short and nested within an outer sub block.
-    # Normally, the existance of the 'sort' block will force the sub block to
+    # Normally, the existence of the 'sort' block will force the sub block to
     # break open, but this is not always desirable. Here we will set a flag for
     # the sort block to prevent this.  To give the user control, we will
     # follow the input file formatting.  If either of the blocks is broken in
@@ -8432,7 +8432,7 @@ sub break_before_list_opening_containers {
         # -bbxi=2 ...
 
         #################################################################
-        # Part 2: Perform tests before commiting to changing ci and level
+        # Part 2: Perform tests before committing to changing ci and level
         #################################################################
 
         # Before changing the ci level of the opening container, we need
@@ -9853,7 +9853,7 @@ EOM
         # Add one token to the next batch.
         # $Ktoken_vars = the index K in the global token array
         # $rtoken_vars = $rLL->[$Ktoken_vars] = the corresponding token values
-        #                unless they are temporarily being overriden
+        #                unless they are temporarily being overridden
 
         # NOTE: This routine needs to be coded efficiently because it is called
         # once per token.  I have gotten it down from the second slowest to the
@@ -12018,7 +12018,7 @@ EOM
             # Check correctness of the mapping between the i and K token
             # indexes.  (The K index is the global index, the i index is the
             # batch index).  It is important to do this check because an error
-            # would be disasterous.  The reason that we should never see an
+            # would be disastrous.  The reason that we should never see an
             # index error here is that sub 'store_token_to_go' has a check to
             # make sure that the indexes in batches remain continuous.  Since
             # sub 'store_token_to_go' controls feeding tokens into batches, so
diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm
index f6a085ba..d7856d9f 100644
--- a/lib/Perl/Tidy/Tokenizer.pm
+++ b/lib/Perl/Tidy/Tokenizer.pm
@@ -2527,7 +2527,7 @@ EOM
                 $in_attribute_list = 1;
             }
 
-            # Withing a signature, unless we are in a ternary.  For example,
+            # Within a signature, unless we are in a ternary.  For example,
             # from 't/filter_example.t':
             #    method foo4 ( $class: $bar ) { $class->bar($bar) }
             elsif ( $paren_type[$paren_depth] =~ /^sub\b/
@@ -7698,7 +7698,7 @@ sub scan_number_do {
            |([0-7_]+               # string of octal digits 
            (\.([0-7][0-7_]*)?)?    # optional decimal and fraction
            [Pp][+-]?[0-7]          # REQUIRED exponent, no underscore
-           [0-7_]*)                # Additonal exponent digits, with underscores
+           [0-7_]*)                # Additional exponent digits, with underscores
 
            # or octal integer
            |([0-7_]+)               # string of octal digits 
diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod
index 5848b711..c9b3405e 100644
--- a/local-docs/BugLog.pod
+++ b/local-docs/BugLog.pod
@@ -245,7 +245,7 @@ while still fixing the problem in case b1031.
 
 Testing produced a blinking state involving a -bbx=2 flag with an unusual
 combination of other parameters.  The problem was traced to the definition of a
-list containg another list being too restrictive.  This update fixes case
+list containing another list being too restrictive.  This update fixes case
 1024.
 
 17 Mar 2021, 7f5da0a.
@@ -401,7 +401,7 @@ aligned.
 
 =item B
 
-In this issue, different results were obtained depending upon the existance of
+In this issue, different results were obtained depending upon the existence of
 a comma in a list.  To fix this, the definition of a list was adjusted from
 requiring one or more commas to requiring either a fat comma or a comma.
 
@@ -543,7 +543,7 @@ is set.  For example, it is ok to keep the long quote following the opening
 paren in the following case.
 
   # perltidy -gnu
-  ok( "got to the end without dieing (note without DEBUGGING passing this test means nothing)"
+  ok( "got to the end without dying (note without DEBUGGING passing this test means nothing)"
     );
 
 26 Feb 2021, 2b88464.
@@ -692,7 +692,7 @@ This will not change much existing code.  This update fixes cases b751 b779.
 
 =item B
 
-Random testing whith very short maximum line lengths produced some blinking
+Random testing with very short maximum line lengths produced some blinking
 states which were traced to the tokenizer alternately parsed an unknown
 bareword as type 'w' or type 'G', depending on whether or not an opening block
 brace immediately followed on the same line.  To fix this, a rule was added
@@ -1174,7 +1174,7 @@ In random testing, the following two alternating states
         )
     }
 
-were occuring with the following particular parameter set
+were occurring with the following particular parameter set
 
     --weld-nested-containers
     --maximum-line-length=40
@@ -1256,7 +1256,7 @@ with the following parameters
     --continuation-indentation=1
 
 The problem was that the token 'FILE' was either parsed as type 'Y'
-or 'Z' depending on the existance of a subsequent space.  These have
+or 'Z' depending on the existence of a subsequent space.  These have
 different line break rules, causing a blinker. The problem was
 fixed by modifying the tokenizer to consider a newline to be a space.
 Updated 16 Jan 2021, d40cca9.
@@ -1503,7 +1503,7 @@ formatting. 3 Jan 2021, e57d8db.
 The code which aligns side comments remembers the most recent side comment and
 in some cases tries to start aligning at that column for later side comments.
 Sometimes the old side comment column was being remembered too long, causing
-occasional poor formatting and causing a noticable and unexpected drift of side
+occasional poor formatting and causing a noticeable and unexpected drift of side
 comment locations to the right.  The rule for forgetting the previous side
 comment column has been modified to reduce this problem.  The new rule is
 essentially to forget the previous side comment location at a new side comment
@@ -2029,7 +2029,7 @@ after the second comma.
 In perltidy a 'marginal match' occurs for example when two lines share some
 alignment tokens but are somewhat different.  When this happens some limits are
 placed on the size of the padding spaces that can be introduced.  In this
-update the amount of allowed padding is significatly increased for certain
+update the amount of allowed padding is significantly increased for certain
 'good' alignment tokens.  Results of extensive testing were favorable provided 
 that the change is restricted to alignments of '=', 'if' and 'unless'.  Update
 made 10 Dec 2020, a585f0b.
@@ -2544,7 +2544,7 @@ The resulting formatting was
 
 Notice that the break after the comma has been lost.  The problem was traced to
 a short-cut taken by the code looking for one-line blocks. The unique
-circumstances in which this occured involved a hash of anonymous subs, one with
+circumstances in which this occurred involved a hash of anonymous subs, one with
 a signature with multiple parameters and short enough to be a one-line block,
 as in the last sub definition line.  This was fixed 17 Oct 2020
 in 'fix missing line break for hash of subs with signatures', 51428db.
@@ -2723,7 +2723,7 @@ This was fixed 20 Sep 2020 in 'fixed_uninitialized_value', 8d6c4ed.
 
 =item B
 
-The following snippet was being incorrecly parsed:
+The following snippet was being incorrectly parsed:
 
  print <<
  # Hello World 13!
@@ -2979,7 +2979,7 @@ out in the wrong order.  This was fixed 11 Sep 2020.
 
 =item B
 
-This crash was due to an index error which caused a non-existant object to be
+This crash was due to an index error which caused a non-existent object to be
 referenced. The problem is fixed 2020-09-07 in "fix problem of undefined values involving j_terminal_match",
 c5bfa77.  The particular parameters which caused this were:
 
@@ -3090,7 +3090,7 @@ Consider the following snippet:
   ok open($stdin, "<&", $1), 'open ... "<&", $magical_fileno', ||  _diag $!;
 
 Note the unusual situation of a comma followed by an '||'.  Perltidy will format this
-satisfactorally but it will write an error message. The syntax is correct, however.
+satisfactorily but it will write an error message. The syntax is correct, however.
 Perl knows the prototype of the 'ok' function, which is called here without parens,
 so the last comma marks the last arg and is needed to keep the || from attaching
 to the last arg.
diff --git a/t/snippets/align20.in b/t/snippets/align20.in
index f01fe831..e381e210 100644
--- a/t/snippets/align20.in
+++ b/t/snippets/align20.in
@@ -1,3 +1,3 @@
-# marginal two-line match; differnt lhs patterns; do not align
+# marginal two-line match; different lhs patterns; do not align
 $w[$i] = $t;
 $t = 1000000;
diff --git a/t/snippets/align24.in b/t/snippets/align24.in
index 5b78b026..58113202 100644
--- a/t/snippets/align24.in
+++ b/t/snippets/align24.in
@@ -1,4 +1,4 @@
-# Do not align interior fat commas here; differnt container types
+# Do not align interior fat commas here; different container types
 my $p    = TAP::Parser::SubclassTest->new(
     {
         exec    => [ $cat            => $file ],
diff --git a/t/snippets/expect/align20.def b/t/snippets/expect/align20.def
index f01fe831..e381e210 100644
--- a/t/snippets/expect/align20.def
+++ b/t/snippets/expect/align20.def
@@ -1,3 +1,3 @@
-# marginal two-line match; differnt lhs patterns; do not align
+# marginal two-line match; different lhs patterns; do not align
 $w[$i] = $t;
 $t = 1000000;
diff --git a/t/snippets/expect/align24.def b/t/snippets/expect/align24.def
index 8e3bf60e..c19c5dc9 100644
--- a/t/snippets/expect/align24.def
+++ b/t/snippets/expect/align24.def
@@ -1,4 +1,4 @@
-# Do not align interior fat commas here; differnt container types
+# Do not align interior fat commas here; different container types
 my $p = TAP::Parser::SubclassTest->new(
     {
         exec    => [ $cat => $file ],
diff --git a/t/snippets/make_t.pl b/t/snippets/make_t.pl
index 9c182015..3d85de6a 100755
--- a/t/snippets/make_t.pl
+++ b/t/snippets/make_t.pl
@@ -589,7 +589,7 @@ sub truncate_string {
         }
 
         # use the first part of the actual string because we have
-        # turned all commas, etc into spaces for testing lenghts
+        # turned all commas, etc into spaces for testing lengths
         $short = substr( $long, 0, length($short) ) . "...";
     }
     return ($short);
diff --git a/t/snippets/perltidy_common_flags.pl b/t/snippets/perltidy_common_flags.pl
index 700771ce..d15f392e 100755
--- a/t/snippets/perltidy_common_flags.pl
+++ b/t/snippets/perltidy_common_flags.pl
@@ -2,7 +2,7 @@
 use strict;
 my @files = @ARGV;
 my %saw;
-# Look at a number of .pro profiles and show ther common flags.
+# Look at a number of .pro profiles and show their common flags.
 # This can help pinpoint the flags which are causing an issue.
 foreach my $file (@files) {
     open( IN, "<", $file ) || die "cannot open $file: $!\n";
diff --git a/t/snippets13.t b/t/snippets13.t
index ed008127..8ffce858 100644
--- a/t/snippets13.t
+++ b/t/snippets13.t
@@ -107,7 +107,7 @@ use constant {
 ----------
 
         'align20' => <<'----------',
-# marginal two-line match; differnt lhs patterns; do not align
+# marginal two-line match; different lhs patterns; do not align
 $w[$i] = $t;
 $t = 1000000;
 ----------
@@ -139,7 +139,7 @@ my $abc = "abc";
 ----------
 
         'align24' => <<'----------',
-# Do not align interior fat commas here; differnt container types
+# Do not align interior fat commas here; different container types
 my $p    = TAP::Parser::SubclassTest->new(
     {
         exec    => [ $cat            => $file ],
@@ -331,7 +331,7 @@ return (
             source => "align20",
             params => "def",
             expect => <<'#12...........',
-# marginal two-line match; differnt lhs patterns; do not align
+# marginal two-line match; different lhs patterns; do not align
 $w[$i] = $t;
 $t = 1000000;
 #12...........
@@ -379,7 +379,7 @@ my $abc  = "abc";
             source => "align24",
             params => "def",
             expect => <<'#16...........',
-# Do not align interior fat commas here; differnt container types
+# Do not align interior fat commas here; different container types
 my $p = TAP::Parser::SubclassTest->new(
     {
         exec    => [ $cat => $file ],
-- 
2.39.5