Skip to content

Commit 6b0b370

Browse files
authored
Merge pull request #42 from xmidt-org/lint
ignore linter errors on pw fields
2 parents db4225c + 04c873a commit 6b0b370

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

internal/consumer/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ type Config struct {
5858
type SASLConfig struct {
5959
Mechanism string
6060
Username string
61-
Password string
61+
// #nosec G117 -- field required for configuration, not logged or exposed
62+
Password string
6263
}
6364

6465
// TLSConfig contains TLS encryption configuration.

internal/consumer/consumer_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,11 @@ func (s *ConsumerTestSuite) TestStart() {
201201
} else {
202202
s.NoError(err)
203203
s.True(s.consumer.IsRunning())
204-
205-
// Clean up goroutines
206-
s.consumer.cancel()
207-
s.consumer.wg.Wait()
208204
}
209205

206+
// Clean up goroutines before asserting expectations
207+
s.consumer.cancel()
208+
s.consumer.wg.Wait()
210209
s.mockClient.AssertExpectations(s.T())
211210
})
212211
}

internal/publisher/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ func (c Config) ToWRPKafkaRoutes() []wrpkafka.TopicRoute {
6161
type SASLConfig struct {
6262
Mechanism string `yaml:"mechanism"`
6363
Username string `yaml:"username"`
64-
Password string `yaml:"password"`
64+
// #nosec G117
65+
Password string `yaml:"password"`
6566
}
6667

6768
// TLSConfig represents TLS configuration

0 commit comments

Comments
 (0)