Permalink
Browse files

static tests: add spell check

  • Loading branch information...
1 parent bd44e35 commit f16ada711dfab37d63aba901599decea8182f942 @elopio elopio committed Nov 1, 2016
@@ -351,11 +351,11 @@ func (s *SnapSuite) TestSnapRunSaneEnvironmentHandling(c *check.C) {
os.Setenv("SNAP_ARCH", "PDP-7")
defer os.Unsetenv("SNAP_NAME")
defer os.Unsetenv("SNAP_ARCH")
- // but unreleated stuff is ok
+ // but unrelated stuff is ok
os.Setenv("SNAP_THE_WORLD", "YES")
defer os.Unsetenv("SNAP_THE_WORLD")
- // and ensure those SNAP_ vars get overriden
+ // and ensure those SNAP_ vars get overridden
rest, err := snaprun.Parser().ParseArgs([]string{"run", "snapname.app", "--arg1", "arg2"})
c.Assert(err, check.IsNil)
c.Assert(rest, check.DeepEquals, []string{"snapname.app", "--arg1", "arg2"})
View
@@ -310,7 +310,7 @@ snapd (2.15.2ubuntu1) xenial; urgency=medium
(cherry pick PR: #1926)
- interfaces: allow xdg-open in unity7, unity7 cleanups
(cherry pick PR: #1946)
- - tests: ensure http{,s}_proxy is defined inside the fake-store
+ - tests: ensure http{,s}_proxy is defined inside the fake-store
(cherry pick PR: #1949)
-- Michael Vogt <michael.vogt@ubuntu.com> Wed, 21 Sep 2016 17:21:12 +0200
@@ -579,7 +579,7 @@ snapd (2.13) xenial; urgency=medium
- overlord/snapstate: check changes to SnapState for conflicts also.
- docs/interfaces: change snappy command to snap
- tests: test `snap run --hook` using in-tree snap-exec.
- - partition: ensure that snap_{kernel,core} is not overriden with an
+ - partition: ensure that snap_{kernel,core} is not overridden with an
empty value
- asserts,overlord/assertstate: introduce an assertstate task
handler to fetch snap assertions
@@ -1139,7 +1139,7 @@ snapd (2.0.4) xenial; urgency=medium
- debian/tests: add reboot capability to autopkgtest and execute
snapPersistsSuite
- daemon,snappy,progress: drop license agreement broken logic
- - daemon,client,cmd/snap: nice access denied message
+ - daemon,client,cmd/snap: nice access denied message
(LP: #1574829)
- daemon: add user parameter to all commands
- snap, store: rework purchase methods into decorators
@@ -1373,7 +1373,7 @@ snapd (1.9.3) xenial; urgency=medium
- daemon: auto install ubuntu-core if missing
- oauth,store: remove OAuth authentication logic
- overlord/ifacestate: simplify some tests with implicit manager
- initalization
+ initialization
- store, snappy: move away from hitting details directly
- overlord/ifacestate: reload connections when restarting the
manager
@@ -1531,7 +1531,7 @@ ubuntu-snappy (1.7.3+20160303ubuntu1) xenial; urgency=medium
- snappy,daemon,snap/lightweight,cmd/snappy,docs/rest.md: expose
explicit channel selection to rest api
- interfaces,daemon: rename package holding built-in interfaces
- - integration-tests: add the first classic dimention tests
+ - integration-tests: add the first classic dimension tests
- client,deaemon,docs: rename skills to interfaces on the wire
- asserts: add identity assertion type
- integration-tests: add the no_proxy env var
@@ -1683,11 +1683,11 @@ ubuntu-snappy (1.7.2+20160204ubuntu1) xenial; urgency=medium
- snappy: move SnapFile.Install() into Overlord.Install()
- integration-tests: re-enable some failover tests
- client: remove snaps
- - asserts: uniform searching accross trusted (account keys) and main
+ - asserts: uniform searching across trusted (account keys) and main
backstore
- asserts: introduce Decoder to parse streams of assertions and
Encoder to build them
- - client: filter snaps with a seach query
+ - client: filter snaps with a search query
- client: pass query as well as path in client internals
- skills: provide different security snippets for skill and slot
side
@@ -1832,7 +1832,7 @@ ubuntu-snappy (1.2-0ubuntu1) wily; urgency=medium
- Consider the root directory when installing and removing policies
- In the uboot TestHandleAssetsNoHardwareYaml, patch the cache dir
before creating the partition type
- - In the PartitionTestSuite, remove the unnecesary patches for
+ - In the PartitionTestSuite, remove the unnecessary patches for
defaultCacheDir
- Fix the help output of "snappy install -h"
@@ -1895,7 +1895,7 @@ ubuntu-snappy (0.1.1-0ubuntu1) vivid; urgency=low
-- Michael Vogt <michael.vogt@ubuntu.com> Thu, 12 Feb 2015 13:51:22 +0100
-ubuntu-snappy (0.1-0ubuntu1) vivid; urgency=medium
+ubuntu-snappy (0.1-0ubuntu1) vivid; urgency=medium
* Initial packaging
@@ -1,5 +1,5 @@
# This file is sourced by Xsession(5), not executed.
-# Add additionnal the additonal snappy desktop path
+# Add the additional snappy desktop path
if [ -z "$XDG_DATA_DIRS" ]; then
# 60x11-common_xdg_path does not always set XDG_DATA_DIRS
@@ -26,7 +26,7 @@ import (
// http://bazaar.launchpad.net/~ubuntu-security/ubuntu-core-security/trunk/view/head:/data/apparmor/policygroups/ubuntu-core/16.04/unity7
const unity7ConnectedPlugAppArmor = `
# Description: Can access Unity7. Restricted because Unity 7 runs on X and
-# requires access to various DBus services and this enviroment does not prevent
+# requires access to various DBus services and this environment does not prevent
# eavesdropping or apps interfering with one another.
# Usage: reserved
@@ -422,7 +422,7 @@ deny /{,var/}{dev,run}/shm/lttng-ust-* r,
// http://bazaar.launchpad.net/~ubuntu-security/ubuntu-core-security/trunk/view/head:/data/seccomp/policygroups/ubuntu-core/16.04/unity7
const unity7ConnectedPlugSecComp = `
# Description: Can access Unity7. Restricted because Unity 7 runs on X and
-# requires access to various DBus services and this enviroment does not prevent
+# requires access to various DBus services and this environment does not prevent
# eavesdropping or apps interfering with one another.
# X
View
@@ -0,0 +1 @@
+auther
@@ -493,7 +493,7 @@ apps:
c.Check(snapRev50.(*asserts.SnapRevision).SnapID(), Equals, fooSnapID)
c.Check(snapRev50.(*asserts.SnapRevision).SnapRevision(), Equals, 50)
- // check udpated wrapper
+ // check updated wrapper
symlinkTarget, err := os.Readlink(info.Apps["bar"].WrapperPath())
c.Assert(err, IsNil)
c.Assert(symlinkTarget, Equals, "/usr/bin/snap")
@@ -69,7 +69,7 @@ func Apply(s *state.State) error {
}
err := applyOne(patch, s, level)
if err != nil {
- logger.Noticef("Cannnot patch: %v", err)
+ logger.Noticef("Cannot patch: %v", err)
return fmt.Errorf("cannot patch system state from level %d to %d: %v", level, level+1, err)
}
level++
@@ -3814,7 +3814,7 @@ func (s *snapmgrTestSuite) TestSeqRevertPostRevertFailure(c *C) {
s.testRevertFailureSequence(c, &opSeqOpts{before: []int{1, 2, 3}, current: 2, via: 1})
}
-// 4c. taht fails after link
+// 4c. that fails after link
func (s *snapmgrTestSuite) TestSeqTotalRevertPostRevertFailure(c *C) {
s.testTotalRevertFailureSequence(c, &opSeqOpts{before: []int{1, 2, 3}, current: 2, via: 1})
}
@@ -746,7 +746,7 @@ func Remove(s *state.State, name string, revision snap.Revision) (*state.TaskSet
return full, nil
}
-// Revert returns a set of tasks for reverting to the pervious version of the snap.
+// Revert returns a set of tasks for reverting to the previous version of the snap.
// Note that the state must be locked by the caller.
func Revert(s *state.State, name string, flags Flags) (*state.TaskSet, error) {
var snapst SnapState
@@ -387,23 +387,7 @@ func (t *Task) HaltTasks() []*Task {
return t.state.tasksIn(t.haltTasks)
}
-// Lanes returns the lanes the task is in.
-func (t *Task) Lanes() []int {
- t.state.reading()
- if len(t.lanes) == 0 {
- return []int{0}
- }
- return t.lanes
-}
-
-// JoinLane registers the task in the provided lane. Tasks in different lanes
-// abort independently on errors. See Change.AbortLane for details.
-func (t *Task) JoinLane(lane int) {
- t.state.writing()
- t.lanes = append(t.lanes, lane)
-}
-
-// At schedules the task, if it's not ready, to happen no earlier than when, if when is the zero time any previous special scheduling is supressed.
+// At schedules the task, if it's not ready, to happen no earlier than when, if when is the zero time any previous special scheduling is suppressed.
func (t *Task) At(when time.Time) {
t.state.writing()
iszero := when.IsZero()
@@ -381,7 +381,7 @@ func mustWait(t *Task) bool {
return false
}
-// wait expectes to be called with th r.mu lock held
+// wait expects to be called with th r.mu lock held
func (r *TaskRunner) wait() {
for len(r.tombs) > 0 {
for _, t := range r.tombs {
@@ -112,7 +112,7 @@ func ForceBootloader(booloader Bootloader) {
forcedBootloader = booloader
}
-// MarkBootSuccessful marks the current boot as sucessful. This means
+// MarkBootSuccessful marks the current boot as successful. This means
// that snappy will consider this combination of kernel/os a valid
// target for rollback
func MarkBootSuccessful(bootloader Bootloader) error {
@@ -48,7 +48,7 @@ type Meter interface {
// interface for writer
Write(p []byte) (n int, err error)
- // notify the user of miscelaneous events
+ // notify the user of miscellaneous events
Notify(string)
}
@@ -172,7 +172,7 @@ func (t *TextProgress) Agreed(intro, license string) bool {
return unicode.ToLower(r) == 'y'
}
-// Notify the user of miscelaneous events
+// Notify the user of miscellaneous events
func (*TextProgress) Notify(msg string) {
fmt.Printf("\r%s%s\n", msg, clearUntilEOL)
}
View
@@ -101,6 +101,11 @@ if [ "$STATIC" = 1 ]; then
go vet $pkg
done
+ echo Checking spelling errors
+ go get -u github.com/client9/misspell/cmd/misspell
+ for file in $(ls . | grep -v 'vendor\|po'); do
+ $GOBIN/misspell -error -i auther $file
+ done
fi
if [ "$UNIT" = 1 ]; then
@@ -116,7 +121,7 @@ if [ "$UNIT" = 1 ]; then
# tests
echo Running tests from $(pwd)
- for pkg in $(go list ./... | grep -v '/vendor/' ); do
+ for pkg in $(go list ./... | grep -v '/vendor/' ); do
$goctest -v -coverprofile=.coverage/profile.out $pkg
append_coverage .coverage/profile.out
done
@@ -176,7 +176,7 @@ func copyToBuildDir(sourceDir, buildDir string) error {
if err := os.Mkdir(dest, info.Mode()); err != nil {
return err
}
- // ensure that premissions are preserved
+ // ensure that permissions are preserved
uid := int(info.Sys().(*syscall.Stat_t).Uid)
gid := int(info.Sys().(*syscall.Stat_t).Gid)
return os.Chown(dest, uid, gid)
View
@@ -33,7 +33,7 @@ const letters = "BCDFGHJKLMNPQRSTVWXYbcdfghjklmnpqrstvwxy0123456789"
// MakeRandomString returns a random string of length length
//
-// The vowels are omited to avoid that words are created by pure
+// The vowels are omitted to avoid that words are created by pure
// chance. Numbers are included.
func MakeRandomString(length int) string {
@@ -1,8 +1,8 @@
// -*- Mode: Go; indent-tabs-mode: t -*-
//
-// 20160229: The tests with gccgo on powerpc fails for this file
-// and it will loop endlessly. This is not reproducable
-// with gccgo on amd64. Given that its a relatively little
+// 20160229: The tests with gccgo on powerpc fail for this file
+// and it will loop endlessly. This is not reproducible
+// with gccgo on amd64. Given that it's a relatively little
// used arch we disable the tests in here to workaround this
// gccgo bug.
// +build !ppc

0 comments on commit f16ada7

Please sign in to comment.