Skip to content

Commit

Permalink
Merge pull request #303 from kolyshkin/codespell
Browse files Browse the repository at this point in the history
CI: add codespell
  • Loading branch information
guelfey authored Feb 13, 2022
2 parents 958b2d1 + 7746142 commit 3500ad4
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 11 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,13 @@ jobs:

- name: Test
run: go test ${{ matrix.race }} -v ./...

codespell:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: install deps
# Version of codespell bundled with Ubuntu is way old, so use pip.
run: pip install codespell
- name: run codespell
run: codespell
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func Connect(address string, opts ...ConnOption) (*Conn, error) {

// SystemBusPrivate returns a new private connection to the system bus.
// Note: this connection is not ready to use. One must perform Auth and Hello
// on the connection before it is useable.
// on the connection before it is usable.
func SystemBusPrivate(opts ...ConnOption) (*Conn, error) {
return Dial(getSystemBusPlatformAddress(), opts...)
}
Expand Down
6 changes: 3 additions & 3 deletions dbus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func Test_VariantOfSlicePtr(t *testing.T) {
value := []TestStruct{{1, "1"}}
dest := []*TestStruct{}

parm := &Message{
param := &Message{
Type: TypeMethodCall,
Flags: FlagNoAutoStart,
Headers: map[HeaderField]Variant{
Expand All @@ -39,9 +39,9 @@ func Test_VariantOfSlicePtr(t *testing.T) {
},
Body: []interface{}{value},
}
parm.Headers[FieldSignature] = MakeVariant(SignatureOf(parm.Body...))
param.Headers[FieldSignature] = MakeVariant(SignatureOf(param.Body...))
buf := new(bytes.Buffer)
err := parm.EncodeTo(buf, nativeEndian)
err := param.EncodeTo(buf, nativeEndian)
if err != nil {
t.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func TestEncodeIntToNonCovertible(t *testing.T) {
err = Store(v, &out)
if err == nil {
t.Logf("%t\n", out)
t.Fatal("Type mismatch should have occured")
t.Fatal("Type mismatch should have occurred")
}
}

Expand Down Expand Up @@ -312,7 +312,7 @@ func TestEncodeUintToNonCovertible(t *testing.T) {
var out bool
err = Store(v, &out)
if err == nil {
t.Fatal("Type mismatch should have occured")
t.Fatal("Type mismatch should have occurred")
}
}

Expand Down
2 changes: 1 addition & 1 deletion introspect/introspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type Interface struct {
Annotations []Annotation `xml:"annotation"`
}

// Method describes a Method on an Interface as retured by an introspection.
// Method describes a Method on an Interface as returned by an introspection.
type Method struct {
Name string `xml:"name,attr"`
Args []Arg `xml:"arg"`
Expand Down
2 changes: 1 addition & 1 deletion object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func TestObjectSignalHandling(t *testing.T) {
go func() {
defer func() {
if err := recover(); err != nil {
t.Errorf("Catched panic in emitter goroutine: %v", err)
t.Errorf("Caught panic in emitter goroutine: %v", err)
}
}()

Expand Down
2 changes: 1 addition & 1 deletion sequential_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ func readSignals(t *testing.T, channel <-chan *Signal, count int) error {
return fmt.Errorf("Received signal out of order. Expected %v, got %v", i, signal.Sequence)
}
case <-ctx.Done():
return errors.New("Timeout occured before all messages received")
return errors.New("Timeout occurred before all messages received")
}
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion server_interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type Method interface {
// any other decoding scheme.
type ArgumentDecoder interface {
// To decode the arguments of a method the sender and message are
// provided incase the semantics of the implementer provides access
// provided in case the semantics of the implementer provides access
// to these as part of the method invocation.
DecodeArguments(conn *Conn, sender string, msg *Message, args []interface{}) ([]interface{}, error)
}
Expand Down
2 changes: 1 addition & 1 deletion variant.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func ParseVariant(s string, sig Signature) (Variant, error) {
}

// format returns a formatted version of v and whether this string can be parsed
// unambigously.
// unambiguously.
func (v Variant) format() (string, bool) {
switch v.sig.str[0] {
case 'b', 'i':
Expand Down

0 comments on commit 3500ad4

Please sign in to comment.