Skip to content

Commit

Permalink
misspell linter addition
Browse files Browse the repository at this point in the history
The following is the addition of the misspell linter. The idea of this
linter is to reduce potiential miss spelling of strings inside the
application. Think of CLI instructions, errors or anything which can't
be typed checked by the compiler.
  • Loading branch information
SimonRichardson committed May 11, 2018
1 parent ea8af13 commit 1802a5a
Show file tree
Hide file tree
Showing 144 changed files with 186 additions and 186 deletions.
2 changes: 1 addition & 1 deletion acceptancetests/assess_container_networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def _get_container_types(client, machine_type):
"""
Give list of container types to run testing against.
If a machine_type was explictly specified, only test against those kind
If a machine_type was explicitly specified, only test against those kind
of containers. Otherwise, test all possible containers for the given
juju version.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# This Amulet based tests
# The goal is to ensure the Ubuntu charm
# sucessfully deploys and can be accessed.
# successfully deploys and can be accessed.
# Note the Ubuntu charm does not have any
# relations or config options.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# This Amulet based tests
# The goal is to ensure the Ubuntu charm
# sucessfully deploys and can be accessed.
# successfully deploys and can be accessed.
# Note the Ubuntu charm does not have any
# relations or config options.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function fill_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1,$col


if (function_exists("imagefilledarc")) {
// exists only if GD 2.0.1 is avaliable
// exists only if GD 2.0.1 is available
imagefilledarc($im, $centerX+1, $centerY+1, $diameter, $diameter, $start, $end, $color1, IMG_ARC_PIE);
imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color2, IMG_ARC_PIE);
imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color1, IMG_ARC_NOFILL|IMG_ARC_EDGED);
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/repository/trusty/haproxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ bandwidth to the backends.
### active-active mode

If the peering\_mode option is set to "active-active", then any haproxy unit
will be independant from each other and will simply load-balance the traffic to
will be independent from each other and will simply load-balance the traffic to
the backends. In this case, the indirection layer described above is not
created in this case.

Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/repository/trusty/haproxy/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ options:
default: ""
type: string
description: |
Key ID to import to the apt keyring to support use with arbitary source
Key ID to import to the apt keyring to support use with arbitrary source
configuration from outside of Launchpad archives or PPA's.
peering_mode:
default: "active-passive"
Expand Down
2 changes: 1 addition & 1 deletion acceptancetests/repository/trusty/haproxy/hooks/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ def notify_relation(relation, changed=False, relation_ids=None):
"Falling back to default host/port.")

if service_name is not None:
# If a specfic service has been asked for then return the ip:port
# If a specific service has been asked for then return the ip:port
# for that service, else pass back the default
requestedservice = get_config_service(service_name)
my_host = get_hostname(requestedservice['service_host'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# This Amulet based tests
# The goal is to ensure the Ubuntu charm
# sucessfully deploys and can be accessed.
# successfully deploys and can be accessed.
# Note the Ubuntu charm does not have any
# relations or config options.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# This Amulet based tests
# The goal is to ensure the Ubuntu charm
# sucessfully deploys and can be accessed.
# successfully deploys and can be accessed.
# Note the Ubuntu charm does not have any
# relations or config options.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function fill_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1,$col


if (function_exists("imagefilledarc")) {
// exists only if GD 2.0.1 is avaliable
// exists only if GD 2.0.1 is available
imagefilledarc($im, $centerX+1, $centerY+1, $diameter, $diameter, $start, $end, $color1, IMG_ARC_PIE);
imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color2, IMG_ARC_PIE);
imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color1, IMG_ARC_NOFILL|IMG_ARC_EDGED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# This Amulet based tests
# The goal is to ensure the Ubuntu charm
# sucessfully deploys and can be accessed.
# successfully deploys and can be accessed.
# Note the Ubuntu charm does not have any
# relations or config options.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function fill_arc($im, $centerX, $centerY, $diameter, $start, $end, $color1,$col


if (function_exists("imagefilledarc")) {
// exists only if GD 2.0.1 is avaliable
// exists only if GD 2.0.1 is available
imagefilledarc($im, $centerX+1, $centerY+1, $diameter, $diameter, $start, $end, $color1, IMG_ARC_PIE);
imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color2, IMG_ARC_PIE);
imagefilledarc($im, $centerX, $centerY, $diameter, $diameter, $start, $end, $color1, IMG_ARC_NOFILL|IMG_ARC_EDGED);
Expand Down
2 changes: 1 addition & 1 deletion agent/tools/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func getDirPerm() os.FileMode {
// File permissions on windows yield diferent results then on Linux
// File permissions on windows yield different results then on Linux
// For example an os.FileMode of 0100 on a directory on Windows,
// will yield -r-xr-xr-x. os.FileMode of 0755 will yield -rwxrwxrwx
if runtime.GOOS == "windows" {
Expand Down
4 changes: 2 additions & 2 deletions agent/tools/toolsdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func UnpackTools(dataDir string, tools *coretools.Tools, r io.Reader) (err error
}

// The tempdir is created with 0700, so we need to make it more
// accessable for juju-run.
// accessible for juju-run.
err = os.Chmod(dir, dirPerm)
if err != nil {
return err
Expand Down Expand Up @@ -201,7 +201,7 @@ func ChangeAgentTools(dataDir string, agentName string, vers version.Binary) (*c
return nil, err
}
// build absolute path to toolsDir. Windows implementation of symlink
// will check for the existance of the source file and error if it does
// will check for the existence of the source file and error if it does
// not exists. This is a limitation of junction points (symlinks) on NTFS
toolPath := ToolsDir(dataDir, tools.Version.String())
toolsDir := ToolsDir(dataDir, agentName)
Expand Down
2 changes: 1 addition & 1 deletion api/apiclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const pingTimeout = 30 * time.Second
const modelRoot = "/model/"

// Use a 64k frame size for the websockets while we need to deal
// with x/net/websocket connections that don't deal with recieving
// with x/net/websocket connections that don't deal with receiving
// fragmented messages.
const websocketFrameSize = 65536

Expand Down
2 changes: 1 addition & 1 deletion api/common/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ func (s *NetworkSuite) TestGetObservedNetworkConfigBridgePortsHaveParentSet(c *g
func (s *NetworkSuite) TestGetObservedNetworkConfigAddressNotInCIDRFormat(c *gc.C) {
s.stubConfigSource.interfaces = exampleObservedInterfaces[1:2] // only eth0
s.stubConfigSource.makeSysClassNetInterfacePath(c, "eth0", "")
// Simluate running on Windows, where net.InterfaceAddrs() returns
// Simulate running on Windows, where net.InterfaceAddrs() returns
// non-CIDR-formatted addresses.
s.stubConfigSource.interfaceAddrs = map[string][]net.Addr{
"eth0": []net.Addr{fakeAddr("10.20.19.42")},
Expand Down
2 changes: 1 addition & 1 deletion api/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func UnderlyingConn(c Connection) jsoncodec.JSONConn {
}

// TestingStateParams is the parameters for NewTestingState, so that you can
// only set the bits that you acutally want to test.
// only set the bits that you actually want to test.
type TestingStateParams struct {
Address string
ModelTag string
Expand Down
4 changes: 2 additions & 2 deletions api/highavailability/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (c *Client) MongoUpgradeMode(v mongo.Version) (params.MongoUpgradeResults,
}
results := params.MongoUpgradeResults{}
if err := c.facade.FacadeCall("StopHAReplicationForUpgrade", arg, &results); err != nil {
return results, errors.Annotate(err, "cannnot enter mongo upgrade mode")
return results, errors.Annotate(err, "can not enter mongo upgrade mode")
}
return results, nil
}
Expand All @@ -79,7 +79,7 @@ func (c *Client) ResumeHAReplicationAfterUpgrade(members []replicaset.Member) er
Members: members,
}
if err := c.facade.FacadeCall("ResumeHAReplicationAfterUpgrad", arg, nil); err != nil {
return errors.Annotate(err, "cannnot resume ha")
return errors.Annotate(err, "can not resume ha")
}
return nil
}
2 changes: 1 addition & 1 deletion api/leadership/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (c *client) BlockUntilLeadershipReleased(serviceId string, cancel <-chan st
//

// prepareClaimLeadership creates a single set of params in
// preperation for making a bulk call.
// preparation for making a bulk call.
func (c *client) prepareClaimLeadership(serviceId, unitId string, duration time.Duration) params.ClaimLeadershipParams {
return params.ClaimLeadershipParams{
names.NewApplicationTag(serviceId).String(),
Expand Down
2 changes: 1 addition & 1 deletion api/uniter/relation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (s *relationSuite) TestRelationById(c *gc.C) {
c.Assert(err, jc.ErrorIsNil)
c.Assert(apiRel, gc.DeepEquals, s.apiRelation)

// Add a relation to mysql application, which cannot be retrived.
// Add a relation to mysql application, which cannot be retrieved.
otherRel, _, _ := s.addRelatedApplication(c, "mysql", "logging", s.mysqlUnit)

// Test some invalid cases.
Expand Down
2 changes: 1 addition & 1 deletion apiserver/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1347,7 +1347,7 @@ func (s *macaroonLoginSuite) testRemoteUserLoginToModelWithExplicitAccess(c *gc.
defer assertStop(c, srv)
srv.Info.ModelTag = s.IAASModel.ModelTag()

// If we have a remote user which has explict model access, but neither
// If we have a remote user which has explicit model access, but neither
// controller access nor 'everyone' access, the user will have access
// only if the AllowModelAccess configuration flag is true.
const remoteUser = "test@somewhere"
Expand Down
4 changes: 2 additions & 2 deletions apiserver/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ type ServerConfig struct {
// "/introspection" prefix.
RegisterIntrospectionHandlers func(func(string, http.Handler))

// RateLimitConfig holds paramaters to control
// RateLimitConfig holds parameters to control
// aspects of rate limiting connections and logins.
RateLimitConfig RateLimitConfig

Expand Down Expand Up @@ -656,7 +656,7 @@ func (srv *Server) endpoints() []apihttp.Endpoint {
unauthenticated: true,
noModelUUID: true,
}, {
// Serve the API at / for backward compatiblity. Note that the
// Serve the API at / for backward compatibility. Note that the
// pat muxer special-cases / so that it does not serve all
// possible endpoints, but only / itself.
pattern: "/",
Expand Down
2 changes: 1 addition & 1 deletion apiserver/charms.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func (d byDepth) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
func (d byDepth) Less(i, j int) bool { return depth(d[i]) < depth(d[j]) }

// repackageAndUploadCharm expands the given charm archive to a
// temporary directoy, repackages it with the given curl's revision,
// temporary directory, repackages it with the given curl's revision,
// then uploads it to storage, and finally updates the state.
func (h *charmsHandler) repackageAndUploadCharm(st *state.State, archive *charm.CharmArchive, curl *charm.URL) error {
// Create a temp dir to contain the extracted charm dir.
Expand Down
2 changes: 1 addition & 1 deletion apiserver/charms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func (s *charmsSuite) TestUploadRepackagesNestedArchives(c *gc.C) {
_, err = charm.ReadCharmArchiveBytes(buf.Bytes())
c.Assert(err, gc.ErrorMatches, `archive file "metadata.yaml" not found`)

// Now try uploading it - should succeeed and be repackaged.
// Now try uploading it - should succeed and be repackaged.
resp := s.uploadRequest(c, s.charmsURI("?series=quantal"), "application/zip", &buf)
expectedURL := charm.MustParseURL("local:quantal/dummy-1")
s.assertUploadResponse(c, resp, expectedURL.String())
Expand Down
2 changes: 1 addition & 1 deletion apiserver/common/instancetypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func NewInstanceTypeConstraints(env environs.Environ, ctx context.ProviderCallCo
}
}

// instanceTypeConstraints holds necesary params to filter instance types.
// instanceTypeConstraints holds necessary params to filter instance types.
type instanceTypeConstraints struct {
constraints constraints.Value
environ environs.Environ
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
// results from machine- and model-scoped watchers, to conform to the behaviour
// of the storageprovisioner worker. The model-level storageprovisioner watches
// model-scoped filesystems that have no backing volume. The machine-level worker
// watches both machine-scoped filesytems, and model-scoped filesystems whose
// watches both machine-scoped filesystems, and model-scoped filesystems whose
// backing volumes are attached to the machine.
type Watchers struct {
Backend Backend
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/application/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ func (s *getSuite) TestApplicationGet(c *gc.C) {

func (s *getSuite) TestGetMaxResolutionInt(c *gc.C) {
// See the bug http://pad.lv/1217742
// Get ends up pushing a map[string]interface{} which containts
// Get ends up pushing a map[string]interface{} which contains
// an int64 through a JSON Marshal & Unmarshal which ends up changing
// the int64 into a float64. We will fix it if we find it is actually a
// problem.
Expand Down
4 changes: 1 addition & 3 deletions apiserver/facades/client/backups/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,11 @@ func (a *APIv2) Restore(p params.RestoreArgs) error {
addr, err := machine.PrivateAddress()
if err != nil {
return errors.Annotatef(err, "error fetching internal address for machine %q", machine)

}

publicAddress, err := machine.PublicAddress()
if err != nil {
return errors.Annotatef(err, "error fetching public address for machine %q", machine)

}

info := a.backend.RestoreInfo()
Expand All @@ -52,7 +50,7 @@ func (a *APIv2) Restore(p params.RestoreArgs) error {
return errors.Annotatef(err, "cannot set the server to %q mode", state.RestoreInProgress)
}
// Any abnormal termination of this function will mark restore as failed,
// succesful termination will call Exit and never run this.
// successful termination will call Exit and never run this.
defer info.SetStatus(state.RestoreFailed)

instanceId, err := machine.InstanceId()
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func (c *ControllerAPI) WatchAllModels() (params.AllWatcherId, error) {
}, nil
}

// GetControllerAccess returns the level of access the specifed users
// GetControllerAccess returns the level of access the specified users
// have on the controller.
func (c *ControllerAPI) GetControllerAccess(req params.Entities) (params.UserAccessResults, error) {
results := params.UserAccessResults{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func (api *HighAvailabilityAPI) StopHAReplicationForUpgrade(args params.UpgradeM
StorageEngine: mongo.StorageEngine(args.Target.StorageEngine),
})
if err != nil {
return params.MongoUpgradeResults{}, errors.Annotate(err, "cannot stop HA for ugprade")
return params.MongoUpgradeResults{}, errors.Annotate(err, "cannot stop HA for upgrade")
}
members := make([]params.HAMember, len(ha.Members))
for i, m := range ha.Members {
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/client/usermanager/usermanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (s *userManagerSuite) TestAddUserWithSecretKey(c *gc.C) {
}}}

result, err := s.usermanager.AddUser(args)
// Check that the call is succesful
// Check that the call is successful
c.Assert(err, jc.ErrorIsNil)
c.Assert(result.Results, gc.HasLen, 1)
foobarTag := names.NewLocalUserTag("foobar")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (st *mockState) SaveIngressNetworks(relationKey string, cidrs []string) (st
func (st *mockState) OfferConnectionForRelation(relationKey string) (crossmodelrelations.OfferConnection, error) {
oc, ok := st.offerConnectionsByKey[relationKey]
if !ok {
return nil, errors.NotFoundf("offer connection details for realtion %v", relationKey)
return nil, errors.NotFoundf("offer connection details for relation %v", relationKey)
}
return oc, nil
}
Expand Down
2 changes: 1 addition & 1 deletion apiserver/facades/controller/firewaller/firewaller.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func NewFirewallerAPI(
accessUnitApplicationOrMachineOrRelation,
)
// ModelConfig() and WatchForModelConfigChanges() are allowed
// with unrestriced access.
// with unrestricted access.
modelWatcher := common.NewModelWatcher(
st,
resources,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func NewInstancePollerAPI(
accessMachine,
)
// ModelConfig() and WatchForModelConfigChanges() are allowed
// with unrestriced access.
// with unrestricted access.
modelWatcher := common.NewModelWatcher(
sti,
resources,
Expand Down
4 changes: 2 additions & 2 deletions apiserver/facades/controller/instancepoller/mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ func NewMockState() *mockState {

var _ instancepoller.StateInterface = (*mockState)(nil)

// CheckFindEntityCall is a helper wrapper aroud
// CheckFindEntityCall is a helper wrapper around
// testing.Stub.CheckCall for FindEntity.
func (m *mockState) CheckFindEntityCall(c *gc.C, index int, machineId string) {
m.CheckCall(c, index, "FindEntity", interface{}(names.NewMachineTag(machineId)))
}

// CheckSetProviderAddressesCall is a helper wrapper aroud
// CheckSetProviderAddressesCall is a helper wrapper around
// testing.Stub.CheckCall for SetProviderAddresses.
func (m *mockState) CheckSetProviderAddressesCall(c *gc.C, index int, addrs []network.Address) {
args := make([]interface{}, len(addrs))
Expand Down
2 changes: 1 addition & 1 deletion apiserver/httpattachment/attachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ type requestSuite struct {

var _ = gc.Suite(&requestSuite{})

// TODO the functions in this pacakge should be tested directly.
// TODO the functions in this package should be tested directly.
// https://bugs.launchpad.net/juju-core/+bug/1503990
2 changes: 1 addition & 1 deletion apiserver/observer/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func removeNilObservers(observers []Observer) []Observer {
return validatedObservers
}

// Multiplexer multiplexes calls to an arbitray number of observers.
// Multiplexer multiplexes calls to an arbitrary number of observers.
type Multiplexer struct {
observers []Observer
}
Expand Down
2 changes: 1 addition & 1 deletion apiserver/params/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type ActionsByReceivers struct {
}

// ActionsByReceiver is a bulk API call wrapper containing Actions,
// either as input paramters or as results.
// either as input parameters or as results.
type ActionsByReceiver struct {
Receiver string `json:"receiver,omitempty"`
Actions []ActionResult `json:"actions,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion apiserver/params/instance_information.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type CloudInstanceTypesConstraints struct {
Constraints []CloudInstanceTypesConstraint `json:"constraints"`
}

// CloudInstanceTypesConstraint contains the cloud information and constraits
// CloudInstanceTypesConstraint contains the cloud information and constraints
// necessary to query for instance types on a given cloud.
type CloudInstanceTypesConstraint struct {
// CloudTag is the tag of the cloud for which instances types
Expand Down
Loading

0 comments on commit 1802a5a

Please sign in to comment.