diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2019-06-19 14:05:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 14:05:03 +0100 |
commit | bc382bba4623a1c7ae16535541f2f4b23708999c (patch) | |
tree | 9149778f259732f866b5265f531a10158dd2eceb /common | |
parent | 7a2d5b17b98172b11ebcf2aa260745d0dccb2a1a (diff) |
Fix pipeline, emoji and syntax (#713)
Fixes #697
Switched to golangci-lint, fixes issues with buildkite and does some linting fixes to appease the new linters.
Diffstat (limited to 'common')
-rw-r--r-- | common/config/config.go | 2 | ||||
-rw-r--r-- | common/log.go | 4 | ||||
-rw-r--r-- | common/partition_offset_table.go | 1 | ||||
-rw-r--r-- | common/test/client.go | 2 | ||||
-rw-r--r-- | common/types.go | 2 |
5 files changed, 5 insertions, 6 deletions
diff --git a/common/config/config.go b/common/config/config.go index 16e50aea..9fcab8cf 100644 --- a/common/config/config.go +++ b/common/config/config.go @@ -585,7 +585,7 @@ func (config *Dendrite) check(monolithic bool) error { } // Due to how Golang manages its interface types, this condition is not redundant. - // In order to get the proper behavior, it is necessary to return an explicit nil + // In order to get the proper behaviour, it is necessary to return an explicit nil // and not a nil configErrors. // This is because the following equalities hold: // error(nil) == nil diff --git a/common/log.go b/common/log.go index 7daa069c..89a70582 100644 --- a/common/log.go +++ b/common/log.go @@ -76,7 +76,7 @@ func SetupHookLogging(hooks []config.LogrusHook, componentName string) { // Check we received a proper logging level level, err := logrus.ParseLevel(hook.Level) if err != nil { - logrus.Fatalf("Unrecognized logging level %s: %q", hook.Level, err) + logrus.Fatalf("Unrecognised logging level %s: %q", hook.Level, err) } // Perform a first filter on the logs according to the lowest level of all @@ -90,7 +90,7 @@ func SetupHookLogging(hooks []config.LogrusHook, componentName string) { checkFileHookParams(hook.Params) setupFileHook(hook, level, componentName) default: - logrus.Fatalf("Unrecognized logging hook type: %s", hook.Type) + logrus.Fatalf("Unrecognised logging hook type: %s", hook.Type) } } } diff --git a/common/partition_offset_table.go b/common/partition_offset_table.go index bb23755c..bf37e2ed 100644 --- a/common/partition_offset_table.go +++ b/common/partition_offset_table.go @@ -50,7 +50,6 @@ type PartitionOffsetStatements struct { // Prepare converts the raw SQL statements into prepared statements. // Takes a prefix to prepend to the table name used to store the partition offsets. // This allows multiple components to share the same database schema. -// nolint: safesql func (s *PartitionOffsetStatements) Prepare(db *sql.DB, prefix string) (err error) { _, err = db.Exec(strings.Replace(partitionOffsetsSchema, "${prefix}", prefix, -1)) if err != nil { diff --git a/common/test/client.go b/common/test/client.go index d1c40e53..a38540ac 100644 --- a/common/test/client.go +++ b/common/test/client.go @@ -34,7 +34,7 @@ type Request struct { LastErr *LastRequestErr } -// LastRequestErr is a synchronized error wrapper +// LastRequestErr is a synchronised error wrapper // Useful for obtaining the last error from a set of requests type LastRequestErr struct { sync.Mutex diff --git a/common/types.go b/common/types.go index e539774e..6888d380 100644 --- a/common/types.go +++ b/common/types.go @@ -43,7 +43,7 @@ type DisplayName struct { // WeakBoolean is a type that will Unmarshal to true or false even if the encoded // representation is "true"/1 or "false"/0, as well as whatever other forms are -// recognized by strconv.ParseBool +// recognised by strconv.ParseBool type WeakBoolean bool // UnmarshalJSON is overridden here to allow strings vaguely representing a true |