Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(DEV-2781): Notify Not Running in a Git Repo #990

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Merge branch 'main' into DEV-2781/warning-when-not-git-repo

2da0274
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Open

feat(DEV-2781): Notify Not Running in a Git Repo #990

Merge branch 'main' into DEV-2781/warning-when-not-git-repo
2da0274
Select commit
Loading
Failed to load commit list.
GitHub Actions / golangci failed Feb 28, 2025 in 0s

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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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")
		^