feat(DEV-2781): Notify Not Running in a Git Repo #990
reviewdog [golangci] report
reported by reviewdog 🐶
Findings (6)
cmd/cmd_utils.go|674 col 37| add-constant: string literal "." appears, at least, 4 times, create a named constant for it (revive)
cmd/cmd_utils.go|678 col 6| do not compare errors directly "err != git.ErrRepositoryNotExists", use "!errors.Is(err, git.ErrRepositoryNotExists)" instead (err113)
cmd/cmd_utils.go|672 col 1| Comment should end in a period (godot)
cmd/cmd_utils.go|687 col 1| Comment should end in a period (godot)
cmd/cmd_utils.go|679 col 4| SA1019: u.LogTrace is deprecated: Use log.Debug
instead. This function will be removed in a future release. LogTrace logs the provided trace message (staticcheck)
cmd/cmd_utils.go|696 col 3| SA1019: u.LogWarning is deprecated: Use log.Warn
instead. This function will be removed in a future release. LogWarning logs the provided warning message (staticcheck)
Filtered Findings (0)
Annotations
Check failure on line 674 in cmd/cmd_utils.go
github-actions / golangci
[golangci] cmd/cmd_utils.go#L674
add-constant: string literal "." appears, at least, 4 times, create a named constant for it (revive)
Raw output
cmd/cmd_utils.go:674:37: add-constant: string literal "." appears, at least, 4 times, create a named constant for it (revive)
_, err := git.PlainOpenWithOptions(".", &git.PlainOpenOptions{
^
Check failure on line 678 in cmd/cmd_utils.go
github-actions / golangci
[golangci] cmd/cmd_utils.go#L678
do not compare errors directly "err != git.ErrRepositoryNotExists", use "!errors.Is(err, git.ErrRepositoryNotExists)" instead (err113)
Raw output
cmd/cmd_utils.go:678:6: do not compare errors directly "err != git.ErrRepositoryNotExists", use "!errors.Is(err, git.ErrRepositoryNotExists)" instead (err113)
if err != git.ErrRepositoryNotExists {
^
Check failure on line 672 in cmd/cmd_utils.go
github-actions / golangci
[golangci] cmd/cmd_utils.go#L672
Comment should end in a period (godot)
Raw output
cmd/cmd_utils.go:672:1: Comment should end in a period (godot)
// isGitRepository checks if the current directory is within a git repository
^
Check failure on line 687 in cmd/cmd_utils.go
github-actions / golangci
[golangci] cmd/cmd_utils.go#L687
Comment should end in a period (godot)
Raw output
cmd/cmd_utils.go:687:1: Comment should end in a period (godot)
// verifyInsideGitRepo checks if we're in a git repo
^
Check failure on line 679 in cmd/cmd_utils.go
github-actions / golangci
[golangci] cmd/cmd_utils.go#L679
SA1019: u.LogTrace is deprecated: Use `log.Debug` instead. This function will be removed in a future release. LogTrace logs the provided trace message (staticcheck)
Raw output
cmd/cmd_utils.go:679:4: SA1019: u.LogTrace is deprecated: Use `log.Debug` instead. This function will be removed in a future release. LogTrace logs the provided trace message (staticcheck)
u.LogTrace(fmt.Sprintf("git check failed: %v", err))
^
Check failure on line 696 in cmd/cmd_utils.go
github-actions / golangci
[golangci] cmd/cmd_utils.go#L696
SA1019: u.LogWarning is deprecated: Use `log.Warn` instead. This function will be removed in a future release. LogWarning logs the provided warning message (staticcheck)
Raw output
cmd/cmd_utils.go:696:3: SA1019: u.LogWarning is deprecated: Use `log.Warn` instead. This function will be removed in a future release. LogWarning logs the provided warning message (staticcheck)
u.LogWarning("You're not inside a git repository. Atmos feels lonely outside - bring it home!\n")
^