Skip to content

Commit

Permalink
style: remove unused nolint and make some file level ones specific
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinkChaos committed Mar 6, 2024
1 parent b533ab7 commit 1a287ce
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
1 change: 0 additions & 1 deletion db/migrations.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//nolint:goerr113
package db

import (
Expand Down
1 change: 0 additions & 1 deletion infocache/albuminfocache/albuminfocache.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//nolint:revive
package albuminfocache

import (
Expand Down
1 change: 0 additions & 1 deletion infocache/artistinfocache/artistinfocache.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//nolint:revive
package artistinfocache

import (
Expand Down
3 changes: 1 addition & 2 deletions scanner/scanner.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//nolint:nestif
package scanner

import (
Expand Down Expand Up @@ -328,7 +327,7 @@ func (s *Scanner) populateTrackAndArtists(tx *db.DB, st *State, i int, album *db
}

// metadata for the album table comes only from the first track's tags
if i == 0 {
if i == 0 { //nolint:nestif
if err := tx.Where("album_id=?", album.ID).Delete(db.ArtistAppearances{}).Error; err != nil {
return fmt.Errorf("delete artist appearances: %w", err)
}
Expand Down
1 change: 0 additions & 1 deletion server/ctrladmin/handlers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//nolint:goerr113
package ctrladmin

import (
Expand Down
4 changes: 3 additions & 1 deletion transcode/transcode.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// author: spijet (https://github.com/spijet/)
// author: sentriz (https://github.com/sentriz/)

//nolint:gochecknoglobals
package transcode

import (
Expand All @@ -18,6 +17,7 @@ type Transcoder interface {
Transcode(ctx context.Context, profile Profile, in string, out io.Writer) error
}

//nolint:gochecknoglobals
var UserProfiles = map[string]Profile{
"mp3": MP3,
"mp3_320": MP3320,
Expand All @@ -32,6 +32,8 @@ var UserProfiles = map[string]Profile{
}

// Store as simple strings, since we may let the user provide their own profiles soon
//
//nolint:gochecknoglobals
var (
MP3 = NewProfile("audio/mpeg", "mp3", 128, `ffmpeg -v 0 -i <file> -ss <seek> -map 0:a:0 -vn -b:a <bitrate> -c:a libmp3lame -f mp3 -`)
MP3320 = NewProfile("audio/mpeg", "mp3", 320, `ffmpeg -v 0 -i <file> -ss <seek> -map 0:a:0 -vn -b:a <bitrate> -c:a libmp3lame -f mp3 -`)
Expand Down
11 changes: 7 additions & 4 deletions version.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
//nolint:gochecknoglobals,golint,stylecheck
package gonic

import (
_ "embed"
"strings"
)

//go:embed version.txt
var version string
var Version = strings.TrimSpace(version)
//nolint:gochecknoglobals
var (
//go:embed version.txt
version string

Version = strings.TrimSpace(version)
)

const (
Name = "gonic"
Expand Down

0 comments on commit 1a287ce

Please sign in to comment.