Skip to content

Commit

Permalink
AVRO-3488 Fix spelling mistakes (#1642)
Browse files Browse the repository at this point in the history
* AVRO-3360 Updated XML documentation

* Revert "AVRO-3360 Updated XML documentation"

This reverts commit b8601c0.

* Fix spelling mistakes

* Fix spelling change

Co-authored-by: Kyle T. Schoonover <[email protected]>
(cherry picked from commit 514e1c2)
  • Loading branch information
KyleSchoonover authored and martin-g committed Apr 14, 2022
1 parent f771e3b commit 72ccbf8
Show file tree
Hide file tree
Showing 34 changed files with 89 additions and 89 deletions.
4 changes: 2 additions & 2 deletions lang/csharp/CodeAnalysis.src.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ dotnet_diagnostic.SA1314.severity = none
# SA1316: Tuple element names should use correct casing
dotnet_diagnostic.SA1316.severity = none

# SA1400: Member should declare an access modifer
# SA1400: Member should declare an access modifier
dotnet_diagnostic.SA1400.severity = warning

# SA1401: Fields should be private
Expand All @@ -1152,7 +1152,7 @@ dotnet_diagnostic.SA1407.severity = none
# SA1408: Conditional expressions should declare precedence
dotnet_diagnostic.SA1408.severity = none

# SA1410: Remove delegate parens when possible
# SA1410: Remove delegate parentheses when possible
dotnet_diagnostic.SA1410.severity = warning

# SA1411: Attribute constructor shouldn't use unnecessary parenthesis
Expand Down
4 changes: 2 additions & 2 deletions lang/csharp/CodeAnalysis.test.globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ dotnet_diagnostic.SA1314.severity = none
# SA1316: Tuple element names should use correct casing
dotnet_diagnostic.SA1316.severity = none

# SA1400: Member should declare an access modifer
# SA1400: Member should declare an access modifier
dotnet_diagnostic.SA1400.severity = none

# SA1401: Fields should be private
Expand All @@ -1149,7 +1149,7 @@ dotnet_diagnostic.SA1407.severity = none
# SA1408: Conditional expressions should declare precedence
dotnet_diagnostic.SA1408.severity = none

# SA1410: Remove delegate parens when possible
# SA1410: Remove delegate parentheses when possible
dotnet_diagnostic.SA1410.severity = none

# SA1411: Attribute constructor shouldn't use unnecessary parenthesis
Expand Down
2 changes: 1 addition & 1 deletion lang/csharp/src/apache/codegen/Avro.codegen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<OutputType>Exe</OutputType>
<!--
Support .NET Core 3.1 (LTS), .NET 5.0, .NET 6.0 (LTS)
When installing with 'dotnet tool install', the proper/supported framwork will be selected,
When installing with 'dotnet tool install', the proper/supported framework will be selected,
unless framework is explicitly specified with 'dotnet tool install'
https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install
-->
Expand Down
2 changes: 1 addition & 1 deletion lang/csharp/src/apache/codegen/AvroGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static int Main(string[] args)
if (args.Contains("--version") || args.Contains("-V"))
{
// Print version information
// Note: Use InformationalVersion attributre
// Note: Use InformationalVersion attribute
// It is capable to include semver prerelease information label (if prerelease), e.g. 1.x.y-beta.z
Console.WriteLine(typeof(AvroGenTool).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion lang/csharp/src/apache/main/CodeGen/CodeGenUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ is regenerated
// Visual Studio 2010 https://msdn.microsoft.com/en-us/library/x53a06bb.aspx
// Note:
// 1. Contextual keywords are not reserved keywords e.g. value, partial
// 2. __arglist, __makeref, __reftype, __refvalue are undocumented keywords, but recognised by the C# compiler
// 2. __arglist, __makeref, __reftype, __refvalue are undocumented keywords, but recognized by the C# compiler
ReservedKeywords = new HashSet<string>() {
"abstract","as", "base", "bool", "break", "byte", "case", "catch", "char", "checked", "class",
"const", "continue", "decimal", "default", "delegate", "do", "double", "else", "enum", "event",
Expand Down
2 changes: 1 addition & 1 deletion lang/csharp/src/apache/main/File/IFileReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public interface IFileReader<T> : IDisposable
/// </summary>
/// <param name="position">Position to test.</param>
/// <returns>
/// True if pasth the next synchronization point after <paramref name="position"/>, false
/// True if path the next synchronization point after <paramref name="position"/>, false
/// otherwise.
/// </returns>
bool PastSync(long position);
Expand Down
32 changes: 16 additions & 16 deletions lang/csharp/src/apache/main/Generic/GenericReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public GenericReader(DefaultReader reader)
/// Reads an object off the stream.
/// </summary>
/// <param name="reuse">
/// If not null, the implemenation will try to use to return the object
/// If not null, the implementation will try to use to return the object
/// </param>
/// <param name="d">Decoder to read from.</param>
/// <returns>Object we read from the decoder.</returns>
Expand All @@ -88,7 +88,7 @@ public T Read(T reuse, Decoder d)
/// <summary>
/// The default implementation for the generic reader. It constructs new .NET objects for avro objects on the
/// stream and returns the .NET object. Users can directly use this class or, if they want to customize the
/// object types for differnt Avro schema types, can derive from this class. There are enough hooks in this
/// object types for different Avro schema types, can derive from this class. There are enough hooks in this
/// class to allow customization.
/// </summary>
/// <remarks>
Expand All @@ -113,7 +113,7 @@ public class DefaultReader
/// <summary>
/// Constructs the default reader for the given schemas using the DefaultReader. If the
/// reader's and writer's schemas are different this class performs the resolution.
/// This default implemenation maps Avro types to .NET types as follows:
/// This default implementation maps Avro types to .NET types as follows:
/// </summary>
/// <param name="writerSchema">The schema used while generating the data</param>
/// <param name="readerSchema">The schema desired by the reader</param>
Expand All @@ -131,7 +131,7 @@ public DefaultReader(Schema writerSchema, Schema readerSchema)
/// <typeparam name="T">The type of object to read. A single schema typically returns an object of a single .NET class.
/// The only exception is UnionSchema, which can return a object of different types based on the branch selected.
/// </typeparam>
/// <param name="reuse">If not null, the implemenation will try to use to return the object</param>
/// <param name="reuse">If not null, the implementation will try to use to return the object</param>
/// <param name="decoder">The decoder for deserialization</param>
/// <returns>Object read from the decoder.</returns>
public T Read<T>(T reuse, Decoder decoder)
Expand All @@ -143,7 +143,7 @@ public T Read<T>(T reuse, Decoder decoder)
/// Reads an object off the stream.
/// </summary>
/// <param name="reuse">
/// If not null, the implemenation will try to use to return the object.
/// If not null, the implementation will try to use to return the object.
/// </param>
/// <param name="writerSchema">Schema used to write the data.</param>
/// <param name="readerSchema">Schema to use when reading the data.</param>
Expand Down Expand Up @@ -356,7 +356,7 @@ protected virtual void AddField(object record, string fieldName, int fieldPos, o
/// <summary>
/// Deserializes a enum. Uses CreateEnum to construct the new enum object.
/// </summary>
/// <param name="reuse">If appropirate, uses this instead of creating a new enum object.</param>
/// <param name="reuse">If appropriate, uses this instead of creating a new enum object.</param>
/// <param name="writerSchema">The schema the writer used while writing the enum</param>
/// <param name="readerSchema">The schema the reader is using</param>
/// <param name="d">The decoder for deserialization.</param>
Expand All @@ -372,7 +372,7 @@ protected virtual object ReadEnum(object reuse, EnumSchema writerSchema, Schema
/// <param name="reuse">If appropriate, use this enum object instead of a new one.</param>
/// <param name="es">The enum schema used by the reader.</param>
/// <param name="symbol">The symbol that needs to be used.</param>
/// <returns>The default implemenation returns a GenericEnum.</returns>
/// <returns>The default implementation returns a GenericEnum.</returns>
protected virtual object CreateEnum(object reuse, EnumSchema es, string symbol)
{
if (reuse is GenericEnum)
Expand Down Expand Up @@ -430,7 +430,7 @@ protected virtual object CreateArray(object reuse, ArraySchema rs)
/// <summary>
/// Returns the size of the given array object.
/// </summary>
/// <param name="array">Array object whose size is required. This is guaranteed to be somthing returned by
/// <param name="array">Array object whose size is required. This is guaranteed to be something returned by
/// a previous call to CreateArray().</param>
/// <returns>The size of the array</returns>
protected virtual int GetArraySize(object array)
Expand All @@ -441,7 +441,7 @@ protected virtual int GetArraySize(object array)
/// <summary>
/// Resizes the array to the new value.
/// </summary>
/// <param name="array">Array object whose size is required. This is guaranteed to be somthing returned by
/// <param name="array">Array object whose size is required. This is guaranteed to be something returned by
/// a previous call to CreateArray().</param>
/// <param name="n">The new size.</param>
protected virtual void ResizeArray(ref object array, int n)
Expand All @@ -454,7 +454,7 @@ protected virtual void ResizeArray(ref object array, int n)
/// <summary>
/// Assigns a new value to the object at the given index
/// </summary>
/// <param name="array">Array object whose size is required. This is guaranteed to be somthing returned by
/// <param name="array">Array object whose size is required. This is guaranteed to be something returned by
/// a previous call to CreateArray().</param>
/// <param name="index">The index to reassign to.</param>
/// <param name="value">The value to assign.</param>
Expand All @@ -467,7 +467,7 @@ protected virtual void SetArrayElement(object array, int index, object value)
/// <summary>
/// Returns the element at the given index.
/// </summary>
/// <param name="array">Array object whose size is required. This is guaranteed to be somthing returned by
/// <param name="array">Array object whose size is required. This is guaranteed to be something returned by
/// a previous call to CreateArray().</param>
/// <param name="index">The index to look into.</param>
/// <returns>The object the given index. Null if no object has been assigned to that index.</returns>
Expand All @@ -477,7 +477,7 @@ protected virtual object GetArrayElement(object array, int index)
}

/// <summary>
/// Deserialized an avro map. The default implemenation creats a new map using CreateMap() and then
/// Deserialized an avro map. The default implementation creates a new map using CreateMap() and then
/// adds elements to the map using AddMapEntry().
/// </summary>
/// <param name="reuse">If appropriate, use this instead of creating a new map object.</param>
Expand All @@ -502,7 +502,7 @@ protected virtual object ReadMap(object reuse, MapSchema writerSchema, Schema re

/// <summary>
/// Used by the default implementation of ReadMap() to create a fresh map object. The default
/// implementaion of this method returns a IDictionary&lt;string, map&gt;.
/// implementation of this method returns a IDictionary&lt;string, map&gt;.
/// </summary>
/// <param name="reuse">If appropriate, use this map object instead of creating a new one.</param>
/// <param name="ms">Map schema to use when creating the object.</param>
Expand Down Expand Up @@ -530,7 +530,7 @@ protected virtual void AddMapEntry(object map, string key, object value)
}

/// <summary>
/// Deserialized an object based on the writer's uninon schema.
/// Deserialized an object based on the writer's union schema.
/// </summary>
/// <param name="reuse">If appropriate, uses this object instead of creating a new one.</param>
/// <param name="writerSchema">The UnionSchema that the writer used.</param>
Expand Down Expand Up @@ -573,10 +573,10 @@ protected virtual object ReadLogical(object reuse, LogicalSchema writerSchema, S
/// </summary>
/// <param name="reuse">If appropriate, uses this object instead of creating a new one.</param>
/// <param name="writerSchema">The FixedSchema the writer used during serialization.</param>
/// <param name="readerSchema">The schema that the readr uses. Must be a FixedSchema with the same
/// <param name="readerSchema">The schema that the reader uses. Must be a FixedSchema with the same
/// size as the writerSchema.</param>
/// <param name="d">The decoder for deserialization.</param>
/// <returns>The deserilized object.</returns>
/// <returns>The deserialized object.</returns>
protected virtual object ReadFixed(object reuse, FixedSchema writerSchema, Schema readerSchema, Decoder d)
{
FixedSchema rs = (FixedSchema)readerSchema;
Expand Down
18 changes: 9 additions & 9 deletions lang/csharp/src/apache/main/Generic/GenericWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void Write(T value, Encoder encoder)
/// A General purpose writer for serializing objects into a Stream using
/// Avro. This class implements a default way of serializing objects. But
/// one can derive a class from this and override different methods to
/// acheive results that are different from the default implementation.
/// achieve results that are different from the default implementation.
/// </summary>
public class DefaultWriter
{
Expand Down Expand Up @@ -246,7 +246,7 @@ protected virtual object GetField(object value, string fieldName, int fieldPos)
}

/// <summary>
/// Serializes an enumeration. The default implementation expectes the value to be string whose
/// Serializes an enumeration. The default implementation expects the value to be string whose
/// value is the name of the enumeration.
/// </summary>
/// <param name="es">The EnumSchema for serialization</param>
Expand Down Expand Up @@ -293,8 +293,8 @@ protected virtual void EnsureArrayObject(object value)

/// <summary>
/// Returns the length of an array. The default implementation requires the object
/// to be an array of objects and returns its length. The defaul implementation
/// gurantees that EnsureArrayObject() has been called on the value before this
/// to be an array of objects and returns its length. The default implementation
/// guarantees that EnsureArrayObject() has been called on the value before this
/// function is called.
/// </summary>
/// <param name="value">The object whose array length is required</param>
Expand All @@ -306,8 +306,8 @@ protected virtual long GetArrayLength(object value)

/// <summary>
/// Returns the element at the given index from the given array object. The default implementation
/// requires that the value is an object array and returns the element in that array. The defaul implementation
/// gurantees that EnsureArrayObject() has been called on the value before this
/// requires that the value is an object array and returns the element in that array. The default implementation
/// guarantees that EnsureArrayObject() has been called on the value before this
/// function is called.
/// </summary>
/// <param name="value">The array object</param>
Expand Down Expand Up @@ -351,7 +351,7 @@ protected virtual void EnsureMapObject(object value)
}

/// <summary>
/// Returns the size of the map object. The default implementation gurantees that EnsureMapObject has been
/// Returns the size of the map object. The default implementation guarantees that EnsureMapObject has been
/// successfully called with the given value. The default implementation requires the value
/// to be an IDictionary&lt;string, object&gt; and returns the number of elements in it.
/// </summary>
Expand All @@ -364,7 +364,7 @@ protected virtual long GetMapSize(object value)

/// <summary>
/// Returns the contents of the given map object. The default implementation guarantees that EnsureMapObject
/// has been called with the given value. The defualt implementation of this method requires that
/// has been called with the given value. The default implementation of this method requires that
/// the value is an IDictionary&lt;string, object&gt; and returns its contents.
/// </summary>
/// <param name="value">The map object whose size is desired</param>
Expand Down Expand Up @@ -437,7 +437,7 @@ protected virtual void WriteFixed(FixedSchema es, object value, Encoder encoder)

/// <summary>
/// Creates a new <see cref="AvroException"/> and uses the provided parameters to build an
/// exception message indicathing there was a type mismatch.
/// exception message indicating there was a type mismatch.
/// </summary>
/// <param name="obj">Object whose type does not the expected type</param>
/// <param name="schemaType">Schema that we tried to write against</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,15 +619,15 @@ protected interface ArrayAccess
/// Hint that the array should be able to handle at least targetSize elements. The array
/// is not required to be resized
/// </summary>
/// <param name="array">Array object who needs to support targetSize elements. This is guaranteed to be somthing returned by
/// <param name="array">Array object who needs to support targetSize elements. This is guaranteed to be something returned by
/// a previous call to CreateArray().</param>
/// <param name="targetSize">The new size.</param>
void EnsureSize(ref object array, int targetSize);

/// <summary>
/// Resizes the array to the new value.
/// </summary>
/// <param name="array">Array object whose size is required. This is guaranteed to be somthing returned by
/// <param name="array">Array object whose size is required. This is guaranteed to be something returned by
/// a previous call to CreateArray().</param>
/// <param name="targetSize">The new size.</param>
void Resize(ref object array, int targetSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ protected int ResolveUnion(UnionSchema us, Schema[] branchSchemas, object obj)

/// <summary>
/// Creates a new <see cref="AvroException"/> and uses the provided parameters to build an
/// exception message indicathing there was a type mismatch.
/// exception message indicating there was a type mismatch.
/// </summary>
/// <param name="obj">Object whose type does not the expected type</param>
/// <param name="schemaType">Schema that we tried to write against</param>
Expand Down Expand Up @@ -383,8 +383,8 @@ protected interface ArrayAccess

/// <summary>
/// Returns the length of an array. The default implementation requires the object
/// to be an array of objects and returns its length. The defaul implementation
/// gurantees that EnsureArrayObject() has been called on the value before this
/// to be an array of objects and returns its length. The default implementation
/// guarantees that EnsureArrayObject() has been called on the value before this
/// function is called.
/// </summary>
/// <param name="value">The object whose array length is required</param>
Expand Down Expand Up @@ -416,7 +416,7 @@ protected interface MapAccess
void EnsureMapObject(object value);

/// <summary>
/// Returns the size of the map object. The default implementation gurantees that EnsureMapObject has been
/// Returns the size of the map object. The default implementation guarantees that EnsureMapObject has been
/// successfully called with the given value. The default implementation requires the value
/// to be an IDictionary&lt;string, object&gt; and returns the number of elements in it.
/// </summary>
Expand Down
Loading

0 comments on commit 72ccbf8

Please sign in to comment.