mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 18:11:48 +00:00
sg: Fix incorrect matching of comments in sg lint -fix go (#46202)
* sg: Fix incorrect matching of comments in `sg lint -fix go` * Remove `CI:LOCALHOST_OK` introduced in #46151
This commit is contained in:
parent
a8e86404c4
commit
373b795ee2
@ -43,7 +43,7 @@ func maybePostgresProcFile() (string, error) {
|
||||
// we configured above.
|
||||
for prefix, database := range databases {
|
||||
if !isPostgresConfigured(prefix) {
|
||||
// Set *PGHOST to default to 127.0.0.1, NOT localhost, as localhost does not correctly resolve in some environments (CI:LOCALHOST_OK)
|
||||
// Set *PGHOST to default to 127.0.0.1, NOT localhost, as localhost does not correctly resolve in some environments
|
||||
// (see https://github.com/sourcegraph/issues/issues/34 and https://github.com/sourcegraph/sourcegraph/issues/9129).
|
||||
SetDefaultEnv(prefix+"PGHOST", "127.0.0.1")
|
||||
SetDefaultEnv(prefix+"PGUSER", "postgres")
|
||||
|
||||
@ -12,7 +12,7 @@ path_filter() {
|
||||
}
|
||||
|
||||
set +e
|
||||
LOCALHOST_MATCHES=$(git grep -e localhost --and --not -e '^\s*//' --and --not -e 'CI\:LOCALHOST_OK' -- '*.go' \
|
||||
LOCALHOST_MATCHES=$(git grep -e localhost --and -e '^(?!\s*//)' --and --not -e 'CI\:LOCALHOST_OK' -- '*.go' \
|
||||
':(exclude)*_test.go' \
|
||||
':(exclude)cmd/server/shared/nginx.go' \
|
||||
':(exclude)dev/sg/sg_setup.go' \
|
||||
|
||||
@ -131,7 +131,7 @@ func Send(ctx context.Context, source string, message Message) (err error) {
|
||||
|
||||
// NOTE: Some services (e.g. Google SMTP relay) require to echo desired hostname,
|
||||
// our current email dependency "github.com/jordan-wright/email" has no option
|
||||
// for it and always echoes "localhost" which makes it unusable. (CI:LOCALHOST_OK)
|
||||
// for it and always echoes "localhost" which makes it unusable.
|
||||
heloHostname := conf.EmailSmtp.Domain
|
||||
if heloHostname == "" {
|
||||
heloHostname = "localhost" // CI:LOCALHOST_OK
|
||||
|
||||
Loading…
Reference in New Issue
Block a user