Skip to content

Commit

Permalink
Fix typos (#342)
Browse files Browse the repository at this point in the history
Most of them found and fixed by codespell
(https://github.com/codespell-project/codespell).

Signed-off-by: Sebastian Pipping <[email protected]>
  • Loading branch information
hartwork authored Dec 18, 2024
1 parent 34f05f5 commit 1829ae8
Show file tree
Hide file tree
Showing 21 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ LCOV features and capabilities fall into 7 major categories:

See "xml2lcov --help" fir brief instructions on how to use
the translator.
See the Coburtura documention for directions on how to
See the Coburtura documentation for directions on how to
generate XML data.

Other languages can be integrated using a similar approach.
Expand Down
10 changes: 5 additions & 5 deletions bin/genhtml
Original file line number Diff line number Diff line change
Expand Up @@ -4221,7 +4221,7 @@ sub new
];
# we will call the $annotateObj->line(int) to collect annotate data
# for certain lines - to find out of a non-code line is in a
# continguous region by the same author, in the same SHA or etc.
# contiguous region by the same author, in the same SHA or etc.
$self->[NEXT] = shift(@{$self->[STACK]});
if (defined($self->[NEXT]) && $self->[NEXT] != 1) {
_computeContextBefore($self, 0);
Expand All @@ -4237,7 +4237,7 @@ sub _computeContextBefore
my $data = $self->[LINECOV_HASH];
my $annotate = $self->[ANNOTATE_OBJ];
# find contiguous source region which matches the select criteria.
# That might include non-code lined (e.g., commments)
# That might include non-code lined (e.g., comments)
for (my $l = $self->[NEXT] - 1; $l > $prev; --$l) {
my $lineData = $data->{$l} if exists($data->{$l});
my $annotateData = $annotate->line($l);
Expand All @@ -4246,7 +4246,7 @@ sub _computeContextBefore
$self->[ANNOTATE_OBJ]->path(), $l);
++$count;
}
# region of interest is the (possibly empty) contigous region we found
# region of interest is the (possibly empty) contiguous region we found
# plus the number of context lines
$self->[LINES_BEFORE] = $num_context_lines + $count;
}
Expand Down Expand Up @@ -10086,7 +10086,7 @@ sub write_file_table_entry(*$$@)
if ($page_type eq 'owner') {
$entry .= 'N' . $id;
} else {
die("unexepected page type $page_type")
die("unexpected page type $page_type")
unless $page_type eq 'date';
$entry .= 'B' . $SummaryInfo::ageHeaderToBin{$id};
}
Expand Down Expand Up @@ -13147,7 +13147,7 @@ sub write_file_table(*$$$$$$)
SummaryInfo::LINE_DATA)
]);
# there might not be optional test data for some tests - that type was
# not emabled
# not enabled
push(@results,
[$mcdc_found,
$mcdc_hit,
Expand Down
2 changes: 1 addition & 1 deletion bin/geninfo
Original file line number Diff line number Diff line change
Expand Up @@ -2629,7 +2629,7 @@ sub intermediate_json_to_info($)
}
}
if ($conditions && @$conditions) {
#die("unexpected multiple conditons at $line") if scalar(@$conditions) > 1;
#die("unexpected multiple conditions at $line") if scalar(@$conditions) > 1;
#lcovutil::debig(1, "MDCD at $filename:$line\n");
my $mcdc = $mcdcMap->new_mcdc($fileData, $line);

Expand Down
2 changes: 1 addition & 1 deletion bin/lcov
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ OPERATION
OPTIONS
-i, --initial Capture initial zero coverage data
--all Captuer from both .gcda and lone .gcno files
--all Capture from both .gcda and lone .gcno files
-t, --test-name NAME Specify test name to be stored with data
-o, --output-file FILENAME Write data to FILENAME instead of stdout
-d, --directory DIR Use .da files in DIR instead of kernel
Expand Down
4 changes: 2 additions & 2 deletions bin/py2lcov
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#
# arguably, should do this in Perl so we could use the lcovutil module utilities
# In the meantime: suggested use model is to translate the python XML using this
# utility, then read it back into lcov for additonal processing.
# utility, then read it back into lcov for additional processing.
#
# @todo figure out/enhance Coverage.py to characterize branch expressions
# @todo perhaps this should be integrated into the Coverage.py module itself.
Expand Down Expand Up @@ -62,7 +62,7 @@ function data because the 'def myFunc(...)' line will acquire a 'hit' count
of 1 because the python interpreter considers the 'def' to have been executed
when the line is interpreted (i.e., when the function is defined).
This will generate an 'inconsistent' error if the function is not executed in
your tests becasue the (derived) function will have a zero hit count but the
your tests because the (derived) function will have a zero hit count but the
first line of the function has a non-zero count.
Best practice is to either always specify '--no-functions' or never specify
'--no-functions'.
Expand Down
4 changes: 2 additions & 2 deletions bin/xml2lcovutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#
# Arguably, this should be done in Perl so we could use lcovutil module utilities.
# In the meantime: suggested use model is to translate the XML using this
# utility, then read it back into lcov for additonal processing.
# utility, then read it back into lcov for additional processing.
#
# @todo figure out how to characterize branch expressions in XML data

Expand Down Expand Up @@ -84,7 +84,7 @@ class ProcessFile:
- Coverage data merge is problematic.
o For eample: you have two testcase XML files, each of which hit
o For example: you have two testcase XML files, each of which hit
4 of 8 branches on some line.
o Does that mean you hit 4 of them (both tests exercised the same
Expand Down
10 changes: 5 additions & 5 deletions lib/lcovutil.pm
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ sub do_mangle_check
sub configure_callback
{
# if there is just one argument, then assume it might be a
# concatentation - otherwise, just use straight.
# concatenation - otherwise, just use straight.
my $cb = shift;
my @args =
1 == scalar(@_) ?
Expand Down Expand Up @@ -1895,7 +1895,7 @@ sub parse_expected_message_counts(@)
($ignore ? ': ignoring.' : ''));
next;
}
# check if syntax look resonable
# check if syntax look reasonable
my $expr = $2;
if (Scalar::Util::looks_like_number($expr)) {
$expected_message_count[$id] = "%C == $expr";
Expand Down Expand Up @@ -1948,7 +1948,7 @@ sub explain_once
# once - e.g., when two or more child processes generate them
# simultaneously.
# They will eventually update the parent process state such that
# subseqent children won't report the issues.
# subsequent children won't report the issues.
my $key = shift;
if (!exists($explainOnce{$key})) {
$explainOnce{$key} = 1;
Expand Down Expand Up @@ -7443,7 +7443,7 @@ sub _filterFile
# Note: this is checking the version of the 'current' file - even if
# we are actually reading the baseline version.
# - This is what we want, as the 'baseline read' is actually recovering/
# recreating the baseline source fromthe current source and the diff.
# recreating the baseline source from the current source and the diff.
# - We already checked that the diff and the coverage DB baseline/current
# version data is consistent - so filtering will be accurate as long as
# we see the right 'current' source version.
Expand Down Expand Up @@ -9176,7 +9176,7 @@ sub merge
my $readSourceFile;
my $t = ref($_[0]);
if (!defined($_[0]) || '' eq $t) {
# backward compatiblity - arg is undefined or is a filename
# backward compatibility - arg is undefined or is a filename
$readSourceFile = ReadCurrentSource->new();
shift unless defined($_[0]);
} else {
Expand Down
24 changes: 12 additions & 12 deletions man/genhtml.1
Original file line number Diff line number Diff line change
Expand Up @@ -528,14 +528,14 @@ and

where
.I $hash
is a reference to a hask of key/value pairs which are meaningful to you.
is a reference to a hash of key/value pairs which are meaningful to you.
This data is stored in the
.I profile
database. See the 'profile' section in man
.B lcovrc(5)
for more information.

If your callback is not a perl module - for example, is a shellscript - then it should return a string such that the first word on each line is the key and the remainder is the associated data. If a key is repeated, then the corresponding data strings are concatentated, separated by newline.
If your callback is not a perl module - for example, is a shellscript - then it should return a string such that the first word on each line is the key and the remainder is the associated data. If a key is repeated, then the corresponding data strings are concatenated, separated by newline.

If you want to record only system information, then a shell callback is likely sufficient. If you want to record any tool-specific/internal information, then you will need to implement a perl module so that your callback will be able to access the information.
Note that the constructor of your
Expand Down Expand Up @@ -614,7 +614,7 @@ path or any parameter contains spaces or shell special characters.
.IP 3. 3
If an option is specified multiple times, then the parameters are
.I not
split, but are simply concatentated to form the command line - see the examples, below.
split, but are simply concatenated to form the command line - see the examples, below.
.br
For simplicity and ease of understanding: your command line should
pass all arguments individually, or all as a comma-separated list - not a mix of the two.
Expand Down Expand Up @@ -2509,7 +2509,7 @@ Use this switch if you want some artifact of coverage report generation -
.I e.g.,
the coverage criteria check or the serialized coverage DB,
.B etc.
- but do not need teh coverage report HTML itself.
- but do not need the coverage report HTML itself.


.RE
Expand Down Expand Up @@ -2738,17 +2738,17 @@ whether the condition was sensitized or not. Conditions are shown in the followi

.RS 3
.IP T: 3
True sense of subexpression was sensitized: if this subexpression's value had been false, then the condition resut would have been different.
True sense of subexpression was sensitized: if this subexpression's value had been false, then the condition result would have been different.
.IP t: 3
True sense of subexpression was
.B not
sensitized: the conditon result would not change if the subexpression value was different.
sensitized: the condition result would not change if the subexpression value was different.
.IP F:
False sense of subexpression was sensitized: if this subexpression's value had been true, then the condition resut would have been different.
False sense of subexpression was sensitized: if this subexpression's value had been true, then the condition result would have been different.
.IP f:
False sense of subexpression was
.B not
sensitized: the conditon result would not change if the subexpression value was different.
sensitized: the condition result would not change if the subexpression value was different.
.RE

Note that branch and MC/DC coverage are identical if the condition is
Expand Down Expand Up @@ -2779,7 +2779,7 @@ constituent expression changed from true to false (termed the 'true' sense, abov
.br
For example, the expression
.I A || B
is sensitve to
is sensitive to
.I A==true
when
.I B==false,
Expand Down Expand Up @@ -2981,7 +2981,7 @@ function execution count record (
.I FN
).
.PP
.IP "(enhanced LCOV fomat)" 3
.IP "(enhanced LCOV format)" 3
function alias record (
.I FNA
) without matching function declaration record (
Expand All @@ -3004,7 +3004,7 @@ internal tool issue detected. Please report this bug along with a testcase.

.IP mismatch: 3
Incorrect or inconsistent information found in coverage data and/or source code - for example,
the souce code contains overlapping exclusion directives.
the source code contains overlapping exclusion directives.

.PP

Expand Down Expand Up @@ -3436,7 +3436,7 @@ that implements a check for "UNC + LBC + UIC == 0".

.I \*[scriptdir]/threshold.pm
.RS
Sample script written as Perl module to check for miminum acceptable
Sample script written as Perl module to check for minimum acceptable
line and/or branch and/or and/or MC/DC function coverage.
For example, the
.RS
Expand Down
10 changes: 5 additions & 5 deletions man/geninfo.1
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ by default.
Follow links when searching .gcda files, as well as to decide whether a
particular (symbolically linked) source directory is "internal" to the project or not - see the
.I \-\-no\-external
option, above, for more inforamtion.
option, above, for more information.
The
.I \-\-follow command line option is equivalent to the
.I geninfo_follow_symlinks
Expand Down Expand Up @@ -928,7 +928,7 @@ internal tool issue detected. Please report this bug along with a testcase.

.IP mismatch: 3
Incorrect information found in coverage data and/or source code - for example,
the souce code contains overlapping exclusion directives.
the source code contains overlapping exclusion directives.
.PP

.IP missing: 3
Expand Down Expand Up @@ -1542,7 +1542,7 @@ is the line number where the condition is found - and is expected to be a non-ze
.I <groupSize>
and
.I <index>
serve to uniquely define a particular elemenet in the expression tree of a particular conditional found on the associated line.
serve to uniquely define a particular element in the expression tree of a particular conditional found on the associated line.
.br
Within a particular line and group,
.I <index>
Expand All @@ -1555,7 +1555,7 @@ is either
.I "f"
or
.I "t",
indicating whether the condition is sensitive to the indicated change - that is, does the condition outcome change if the corresponging changes from 'false' to 'true' or from 'tru' to 'false, respectively.
indicating whether the condition is sensitive to the indicated change - that is, does the condition outcome change if the corresponding changes from 'false' to 'true' or from 'tru' to 'false, respectively.


.I <taken>
Expand All @@ -1566,7 +1566,7 @@ as the number of times that the expression was sensitized where others may treat
as a boolean - 1:sensitized or 0: not sensitized.

.I <expression>
is an arbitary string, intended to be a meaningful string which will help the user to understand the condition context - see below.
is an arbitrary string, intended to be a meaningful string which will help the user to understand the condition context - see below.
.I <expression>
appears in the 'tooltip' popup of the associated MC/DC condition in the
.B genhtml
Expand Down
6 changes: 3 additions & 3 deletions man/lcov.1
Original file line number Diff line number Diff line change
Expand Up @@ -777,11 +777,11 @@ One or more
.I \-\-substitution
patterns and/or a
.I \-\-resolve-script
may be specified. When multiple paterns are specified, they are applied in the order specifed, substitution patterns first followed by the resolve callback.
may be specified. When multiple patterns are specified, they are applied in the order specified, substitution patterns first followed by the resolve callback.
The file search order is:
.RS
.IP 1. 3
Look for file name (unmodifed).
Look for file name (unmodified).
.br
If the file exits: return it.
.PP
Expand All @@ -791,7 +791,7 @@ Apply all substitution patterns in order - the result of the first pattern is us
If a file corresponding to the resulting name exists: return it.
.PP
.IP 3. 3
Apply the 'resolve' callback ot the final result of pattern substituions.
Apply the 'resolve' callback ot the final result of pattern substitutions.
.br
If a file corresponding to the resulting name exists: return it.
.PP
Expand Down
2 changes: 1 addition & 1 deletion scripts/P4version.pm
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ sub new
die("unexpected 'p4 opened' line '$_'");
}
}
close(EDITS) or die("error on clos 'p4 opened' pipe: $!");
close(EDITS) or die("error on close 'p4 opened' pipe: $!");

my $self =
[$allow_missing, $local_edit, $use_md5, $prefix, $depot, \%filehash];
Expand Down
4 changes: 2 additions & 2 deletions scripts/batchGitVersion.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program; if not, see
# <http://www.gnu.org/licenses/>.
#
# This implemenation creates an initial database to hold the version stamps
# This implementation creates an initial database to hold the version stamps
# for all files in the repo - then simply queries that DB during
# execution. See 'usage' for details:#
# .../batchGitVersion.pm --help
Expand Down Expand Up @@ -77,7 +77,7 @@ EOF
in the repo, then 'x/y/dir/file' is stored.
--prefix dir : add dir to the list of directories to search, to find
pathname.
--token string : use string as the blob sha token in the vesion string.
--token string : use string as the blob sha token in the version string.
default value is 'BLOB' - so application can
distinguish between SHA types - say, to complare
to compare a BLOB SHA to a file SHA.
Expand Down
2 changes: 1 addition & 1 deletion scripts/p4annotate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# of cached files - and may result in out-of-sync annotated file data.
#
# The '--verify' flag tells the tool to do some additional consistency
# checking whe merging local edits into the annoted file.
# checking whe merging local edits into the annotated file.
#
# The '--log' flag specifies a file where the tool writes various annotation-
# related log messages.
Expand Down
2 changes: 1 addition & 1 deletion scripts/select.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# which should be retained:
# select.pm --tla LBC,UNC,UIC ...
#
# --sha/--cl: is a (posibly comma-separated list of) git SHAs or
# --sha/--cl: is a (possibly comma-separated list of) git SHAs or
# perforce changelists which should be retained.
# Match checks that the provided string matches the leading characters
# of the full SHA or changelist.
Expand Down
2 changes: 1 addition & 1 deletion scripts/threshold.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# lcov/geninfo/genhtml.
# It can be called at any level of hierarchy - but is really expected to be
# called at the 'file' or 'top' level, in lcov or geninfo.
# It simply checks that the 'type' coverage (line, branch, fucntion) exceeds
# It simply checks that the 'type' coverage (line, branch, function) exceeds
# the threshold.
#
# Format of the JSON input is:
Expand Down
2 changes: 1 addition & 1 deletion tests/gendiffcov/errs/genError.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env perl

# die() when callback is called - to enable erorr message testing
# die() when callback is called - to enable error message testing

package genError;

Expand Down
2 changes: 1 addition & 1 deletion tests/gendiffcov/errs/mcdc_errs.dat
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ MCDC:1,2,t,0,0,0
MCDC:1,2,f,0,0,0

MCDC:11,1,t,0,0,0
MCDC:11,1,f,0,0,differnt expression
MCDC:11,1,f,0,0,different expression

MCDC:0,1,t,1,0,0

Expand Down
2 changes: 1 addition & 1 deletion tests/gendiffcov/errs/msgtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ if [ 0 != $? ] ; then
fi
# differntial report with empty diff file
# differential report with empty diff file
touch diff.txt
echo genhtml $DIFCOV_OPTS initial.info -o empty --diff diff.txt --annotate $ANNOTATE_SCTIPT --baseline-file initial.info
$COVER $GENHTML_TOOL $DIFFCOV_OPTS initial.info -o empty --diff diff.txt --annotate $ANNOTATE_SCRIPT --baseline-file initial.info 2>&1 | tee empty_diff.log
Expand Down
Loading

0 comments on commit 1829ae8

Please sign in to comment.