Skip to content

Commit

Permalink
fix: // nolint => //nolint (drop leading space)
Browse files Browse the repository at this point in the history
  • Loading branch information
polarathene committed Sep 20, 2023
1 parent 89ea395 commit 409ce54
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ var (
defaultLogLevel = "error"
)

// nolint
//nolint
func main() {
ctx := kong.Parse(&CLI)

Expand Down
4 changes: 2 additions & 2 deletions pkg/porcelain.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (p *Porcelain) PrintEntries(entries []core.EnvEntry) {

for i := range entries {
v := entries[i]
ep := ellipsis.Shorten(v.ResolvedPath, 30) // nolint: gomnd
ep := ellipsis.Shorten(v.ResolvedPath, 30) //nolint: gomnd
if !v.IsFound {
fmt.Fprintf(&buf, "[%s %s %s] %s\n", yellow(v.ProviderName), gray(ep), red("missing"), green(v.Key))
} else {
Expand All @@ -123,7 +123,7 @@ func (p *Porcelain) PrintEntries(entries []core.EnvEntry) {
fmt.Fprint(p.Out, out)
}
func maskedValue(v string) string {
return fmt.Sprintf("%s*****", v[:int(math.Min(float64(len(v)), 2))]) // nolint: gomnd
return fmt.Sprintf("%s*****", v[:int(math.Min(float64(len(v)), 2))]) //nolint: gomnd
}

func (p *Porcelain) PrintMatches(matches []core.Match) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/heroku.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (h *Heroku) GetMapping(p core.KeyPath) ([]core.EnvEntry, error) {
return entries, nil
}

func (h *Heroku) Get(p core.KeyPath) (*core.EnvEntry, error) { // nolint:dupl
func (h *Heroku) Get(p core.KeyPath) (*core.EnvEntry, error) { //nolint:dupl
secret, err := h.getSecret(p)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/keypass.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type KeyPass struct {

const KeyPassName = "KeyPass"

// nolint
//nolint
func init() {
metaInfo := core.MetaInfo{
Description: "Keypass",
Expand Down
4 changes: 2 additions & 2 deletions pkg/providers/lastpass.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (l *LastPass) notesToMap(notes string) map[string]string {
results := map[string]string{}
scanner := bufio.NewScanner(strings.NewReader(notes))
for scanner.Scan() {
findings := strings.SplitN(scanner.Text(), ":", 2) // nolint: gomnd
findings := strings.SplitN(scanner.Text(), ":", 2) //nolint: gomnd
if len(findings) == findingNoteCount {
results[strings.TrimSpace(findings[0])] = strings.TrimSpace(findings[1])
}
Expand All @@ -161,7 +161,7 @@ func (l *LastPass) getNodeByKeyName(key, notes string) (string, error) {

scanner := bufio.NewScanner(strings.NewReader(notes))
for scanner.Scan() {
findings := strings.SplitN(scanner.Text(), ":", 2) // nolint: gomnd
findings := strings.SplitN(scanner.Text(), ":", 2) //nolint: gomnd
if len(findings) == findingNoteCount && findings[0] == key {
return strings.TrimSpace(findings[1]), nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/process_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (a *ProcessEnv) GetMapping(p core.KeyPath) ([]core.EnvEntry, error) {

kvs := make(map[string]string)
for _, envs := range os.Environ() {
pair := strings.SplitN(envs, "=", 2) // nolint: gomnd
pair := strings.SplitN(envs, "=", 2) //nolint: gomnd
kvs[pair[0]] = pair[1]
}
var entries []core.EnvEntry
Expand Down
2 changes: 1 addition & 1 deletion pkg/providers/vercel.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (ve *Vercel) GetMapping(p core.KeyPath) ([]core.EnvEntry, error) {
return entries, nil
}

func (ve *Vercel) Get(p core.KeyPath) (*core.EnvEntry, error) { // nolint:dupl
func (ve *Vercel) Get(p core.KeyPath) (*core.EnvEntry, error) { //nolint:dupl
secret, err := ve.getSecret(p)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion pkg/teller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (im *InMemProvider) Meta() core.MetaInfo {
return core.MetaInfo{}
}

// nolint
//nolint
func init() {
inmemProviderMeta := core.MetaInfo{
Name: "inmem-provider",
Expand Down

0 comments on commit 409ce54

Please sign in to comment.