Skip to content

Commit

Permalink
Fix codespell issues
Browse files Browse the repository at this point in the history
See,
$ codespell --skip="./.git/*,./vim25/xml*,./vendor*" --ignore-words-list="cas,compres,mor,te,uint"

Excluding vendoring, git, and vim25/xml plus some special words.
  • Loading branch information
mjtrangoni committed Mar 1, 2019
1 parent 1eb0064 commit a7c0322
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 29 deletions.
2 changes: 1 addition & 1 deletion govc/test/pool.bats
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ load test_helper
result=$(govc ls "host/*/Resources/govc-test-*" | wc -l)
[ $result -eq 1 ]

# delete childs
# delete children
run govc pool.destroy -children $path
assert_success

Expand Down
3 changes: 2 additions & 1 deletion govc/vm/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ type infoResult struct {
// collectReferences builds a unique set of MORs to the set of VirtualMachines,
// so we can collect properties in a single call for each reference type {host,datastore,network}.
func (r *infoResult) collectReferences(pc *property.Collector, ctx context.Context) error {
r.entities = make(map[types.ManagedObjectReference]string) // MOR -> Name map
// MOR -> Name map
r.entities = make(map[types.ManagedObjectReference]string)

var host []mo.HostSystem
var network []mo.Network
Expand Down
4 changes: 2 additions & 2 deletions govc/vm/vnc.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ func (i *intRange) Set(s string) error {

low, err := strconv.Atoi(m[1])
if err != nil {
return fmt.Errorf("could't convert to integer: %v", err)
return fmt.Errorf("couldn't convert to integer: %v", err)
}

high, err := strconv.Atoi(m[2])
if err != nil {
return fmt.Errorf("could't convert to integer: %v", err)
return fmt.Errorf("couldn't convert to integer: %v", err)
}

if low > high {
Expand Down
4 changes: 2 additions & 2 deletions nfc/lease_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func (o FileItem) File() types.OvfFile {
}

type LeaseUpdater struct {
pos int64 // Number of bytes (keep first to ensure 64 bit aligment)
total int64 // Total number of bytes (keep first to ensure 64 bit aligment)
pos int64 // Number of bytes (keep first to ensure 64 bit alignment)
total int64 // Total number of bytes (keep first to ensure 64 bit alignment)

lease *Lease

Expand Down
3 changes: 2 additions & 1 deletion pbm/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ func TestClient(t *testing.T) {
sort.Strings(qids)
sort.Strings(cids)

// Check whether ids retreived from QueryProfile and RetrieveContent are identical.
// Check whether ids retrieved from QueryProfile and RetrieveContent
// are identical.
if !reflect.DeepEqual(qids, cids) {
t.Error("ids mismatch")
}
Expand Down
2 changes: 1 addition & 1 deletion pbm/simulator/simulator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestSimulator(t *testing.T) {
sort.Strings(qids)
sort.Strings(cids)

// Check whether ids retreived from QueryProfile and RetrieveContent are identical.
// Check whether ids retrieved from QueryProfile and RetrieveContent are identical.
if !reflect.DeepEqual(qids, cids) {
t.Error("ids mismatch")
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/vcsa/create-vcsa-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ opts+=(
)

if [ "$product" = "ws" ] ; then
# workstation does not suport NFC
# workstation does not support NFC
dir=$(govc datastore.info -json | jq -r .Datastores[0].Info.Url)

ovftool --name="$name" --acceptAllEulas "$ova" "$dir"
Expand Down
4 changes: 2 additions & 2 deletions simulator/esx/task_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9735,7 +9735,7 @@ var Description = types.TaskDescription{
&types.ElementDescription{
Description: types.Description{
Label: "Retrieve Managed Method Executer",
Summary: "Retrieves a referemce to Managed Method Executer",
Summary: "Retrieves a reference to Managed Method Executer",
},
Key: "HostSystem.retrieveManagedMethodExecuter",
},
Expand Down Expand Up @@ -9819,7 +9819,7 @@ var Description = types.TaskDescription{
&types.ElementDescription{
Description: types.Description{
Label: "Query feature capabilities for vSphere Distributed Switch specification",
Summary: "Queries feature capabilites available for a given vSphere Distributed Switch specification",
Summary: "Queries feature capabilities available for a given vSphere Distributed Switch specification",
},
Key: "dvs.DistributedVirtualSwitchManager.queryFeatureCapability",
},
Expand Down
4 changes: 2 additions & 2 deletions simulator/license_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func TestAddRemoveLicense(t *testing.T) {
}

if len(info.Labels) != len(labels) {
t.Fatalf("expect len(info.Labels) eqaul to %d; got %d",
t.Fatalf("expect len(info.Labels) equal to %d; got %d",
len(labels), len(info.Labels))
}

Expand All @@ -181,7 +181,7 @@ func TestAddRemoveLicense(t *testing.T) {
}

if len(la[1].Labels) != len(labels) {
t.Fatalf("expect len(info.Labels) eqaul to %d; got %d",
t.Fatalf("expect len(info.Labels) equal to %d; got %d",
len(labels), len(la[1].Labels))
}

Expand Down
2 changes: 1 addition & 1 deletion simulator/performance_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func testPerfQuery(ctx context.Context, m *Model, e mo.Entity, interval int32) e
return err
}
if len(result) == 0 {
return errors.New("Emtpy result set")
return errors.New("Empty result set")
}
ms, err := p.ToMetricSeries(ctx, result)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion simulator/property_collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ func TestWaitForUpdatesOneUpdateCalculation(t *testing.T) {
set := res.Returnval
if set == nil {
// Retry if the result came back empty
// Thats a normal case when MaxWaitSeconds is set to 0.
// That's a normal case when MaxWaitSeconds is set to 0.
// It means we have no updates for now
time.Sleep(500 * time.Millisecond)
continue
Expand Down
6 changes: 3 additions & 3 deletions simulator/vpx/performance_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -4436,7 +4436,7 @@ var PerfCounter = []types.PerfCounterInfo{
NameInfo: &types.ElementDescription{
Description: types.Description{
Label: "Net Throughput Contention",
Summary: "The aggregate network droppped packets for the host",
Summary: "The aggregate network dropped packets for the host",
},
Key: "throughput.contention",
},
Expand Down Expand Up @@ -7277,7 +7277,7 @@ var PerfCounter = []types.PerfCounterInfo{
Key: 251,
NameInfo: &types.ElementDescription{
Description: types.Description{
Label: "VXLAN Nework Found Matched ARP Entry Throughput",
Label: "VXLAN Network Found Matched ARP Entry Throughput",
Summary: "Count of transmitted packets that found matched ARP entry for this network",
},
Key: "throughput.vds.arpFound",
Expand Down Expand Up @@ -10728,7 +10728,7 @@ var PerfCounter = []types.PerfCounterInfo{
Key: 370,
NameInfo: &types.ElementDescription{
Description: types.Description{
Label: "VXLAN Nework Found Matched ARP Entry Throughput",
Label: "VXLAN Network Found Matched ARP Entry Throughput",
Summary: "Count of transmitted packets that found matched ARP entry for this network",
},
Key: "throughput.vds.arpFound",
Expand Down
10 changes: 5 additions & 5 deletions simulator/vpx/task_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ var Description = types.TaskDescription{
&types.ElementDescription{
Description: types.Description{
Label: "Query feature capabilities for vSphere Distributed Switch specification",
Summary: "Queries feature capabilites available for a given vSphere Distributed Switch specification",
Summary: "Queries feature capabilities available for a given vSphere Distributed Switch specification",
},
Key: "dvs.DistributedVirtualSwitchManager.queryFeatureCapability",
},
Expand Down Expand Up @@ -7040,7 +7040,7 @@ var Description = types.TaskDescription{
&types.ElementDescription{
Description: types.Description{
Label: "Retrieve Managed Method Executer",
Summary: "Retrieves a referemce to Managed Method Executer",
Summary: "Retrieves a reference to Managed Method Executer",
},
Key: "HostSystem.retrieveManagedMethodExecuter",
},
Expand Down Expand Up @@ -10876,7 +10876,7 @@ var Description = types.TaskDescription{
&types.ElementDescription{
Description: types.Description{
Label: "Convert to a stretched cluster",
Summary: "Convert the given configuration to a streched cluster",
Summary: "Convert the given configuration to a stretched cluster",
},
Key: "com.vmware.vsan.stretchedcluster.tasks.convert2stretchedcluster",
},
Expand Down Expand Up @@ -10988,14 +10988,14 @@ var Description = types.TaskDescription{
&types.ElementDescription{
Description: types.Description{
Label: "Detect Update Manager Guest Agent",
Summary: "Detect Update Manager Guest Agent installataion on Linux VMs",
Summary: "Detect Update Manager Guest Agent installation on Linux VMs",
},
Key: "com.vmware.vcIntegrity.DetectLinuxGATask",
},
&types.ElementDescription{
Description: types.Description{
Label: "Cancel detecting Update Manager GuestAgent",
Summary: "Cancel detecting Update Manager GuestAgent installataion on Linux VMs",
Summary: "Cancel detecting Update Manager GuestAgent installation on Linux VMs",
},
Key: "com.vmware.vcIntegrity.CancelDetectLinuxGATask",
},
Expand Down
2 changes: 1 addition & 1 deletion task/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (t *taskCallback) fn(pc []types.PropertyChange) bool {
t.info = &ti
}

// t.info could be nil if pc can't satify the rules above
// t.info could be nil if pc can't satisfy the rules above
if t.info == nil {
return false
}
Expand Down
2 changes: 1 addition & 1 deletion toolbox/hgfs/protocol_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestProtocolEncoding(t *testing.T) {
packetSize = ps
}()

// a few structs have pading of some sort, leave PacketSize as-is for now with these tests
// a few structs have padding of some sort, leave PacketSize as-is for now with these tests
packetSize = func(r *Packet) uint32 {
return r.PacketSize
}
Expand Down
2 changes: 1 addition & 1 deletion vim25/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type Client struct {
RoundTripper soap.RoundTripper
}

// NewClient creates and returns a new client wirh the ServiceContent field
// NewClient creates and returns a new client with the ServiceContent field
// filled in.
func NewClient(ctx context.Context, rt soap.RoundTripper) (*Client, error) {
c := Client{
Expand Down
2 changes: 1 addition & 1 deletion vim25/mo/type_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (t *typeInfo) build(typ reflect.Type, fn string, fi []int) {

var nilValue reflect.Value

// assignValue assignes a value 'pv' to the struct pointed to by 'val', given a
// assignValue assigns a value 'pv' to the struct pointed to by 'val', given a
// slice of field indices. It recurses into the struct until it finds the field
// specified by the indices. It creates new values for pointer types where
// needed.
Expand Down
4 changes: 2 additions & 2 deletions vim25/soap/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ func TestInvalidRootCAPath(t *testing.T) {
err := setCAsOnClient("fixtures/there-is-no-such-file")

if _, ok := err.(*os.PathError); !ok {
t.Fatalf("os.PathError should have occured: %#v", err)
t.Fatalf("os.PathError should have occurred: %#v", err)
}
}

func TestValidRootCAs(t *testing.T) {
err := setCAsOnClient("fixtures/valid-cert.pem")

if err != nil {
t.Fatalf("Err should not have occured: %#v", err)
t.Fatalf("Err should not have occurred: %#v", err)
}
}

Expand Down

0 comments on commit a7c0322

Please sign in to comment.