lvc / api-sanity-checker

An automatic generator of basic unit tests for a C/C++ library
https://lvc.github.io/api-sanity-checker/
GNU Lesser General Public License v2.1
85 stars 13 forks source link

spellfix #14

Closed orbitcowboy closed 11 years ago

orbitcowboy commented 11 years ago

Please review the attached patch, it fixes wrong spelled words in your code:

diff --git a/api-sanity-checker.pl b/api-sanity-checker.pl
index 8c88e3a..547d0fb 100755
--- a/api-sanity-checker.pl
+++ b/api-sanity-checker.pl
@@ -5543,7 +5543,7 @@ sub add_VirtualSpecType(@)
     my $I_Header = $CompleteSignature{$Init_Desc{"Interface"}}{"Header"};
     if($Init_Desc{"Value"} eq "no value"
     or (defined $ValueCollection{$CurrentBlock}{$ParamName} and $ValueCollection{$CurrentBlock}{$ParamName}==$TypeId))
-    { # create value atribute
+    { # create value attribute
         if($CurrentBlock and keys(%{$ValueCollection{$CurrentBlock}}) and not $Init_Desc{"InLineArray"})
         {
             ($NewInit_Desc{"Value"}, $NewInit_Desc{"ValueTypeId"}) = select_ValueFromCollection(%Init_Desc);
@@ -6441,7 +6441,7 @@ sub convert_familiar_types(@)
     $NeedTypeConvertion = 0 if($OutputType_Name eq $Conv{"InputTypeName"});
     $NeedTypeConvertion = 0 if(uncover_typedefs($OutputType_Name)=~/\[(\d+|)\]/);#arrays

-    # type convertion
+    # type conversion
     if($NeedTypeConvertion and ($Conv{"Destination"} eq "Param"))
     {
         if($ToCall=~/\-\>/) {
@@ -8190,7 +8190,7 @@ sub declare_anon_union($$)
         @MembStr = (@MembStr, $MembDecl);
     }
     my $Type_Name = select_type_name("union_type_".$Key);
-    $Declarations .= "//auxilliary union type\nunion ".$Type_Name;
+    $Declarations .= "//auxiliary union type\nunion ".$Type_Name;
     $Declarations .= "{\n    ".join(";\n    ", @MembStr).";};\n\n";
     $AuxType{$UnionId} = "union ".$Type_Name;
     $TName_Tid{$AuxType{$UnionId}} = $UnionId;
aponomarenko commented 11 years ago

Thank you. The patch is approved for 1.98.3

aponomarenko commented 11 years ago

What tool did you use to check spelling?

orbitcowboy commented 11 years ago

I used codespell. This tools is available here:

https://github.com/lucasdemarchi/codespell

I created on own dictionary file, in order to detect more errors. If you like, i can create a little project here on github and share it with you?

Best regards

Martin

aponomarenko commented 11 years ago

Yes, please. It would be great. I have not checked spelling of my projects yet and I need such a tool and dictionary.

orbitcowboy commented 11 years ago

Sorry for the delay, as promised, i published my customized dictionary file ( needed by codespell ) at github: https://github.com/orbitcowboy/codespell_dictionary

Enjoy :-)

If you like to extend it about, please let me know.

Best regards

Martin

aponomarenko commented 11 years ago

Cool, thanks!