Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mircearoata committed Oct 14, 2024
1 parent 9b04ae9 commit ad4f421
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ issues:

run:
timeout: 5m
build-tags:
- webkit2_41

linters:
disable-all: true
Expand Down
2 changes: 1 addition & 1 deletion backend/ficsitcli/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (f *ficsitCLI) getInstallsToApply() ([]installWithTarget, *cli.Profile, err
continue
}
i := f.GetInstallation(install)
if i.Profile == selectedProfile && i.Vanilla == false {
if i.Profile == selectedProfile && !i.Vanilla {
platform, err := i.GetPlatform(f.ficsitCli)
if err != nil {
return nil, nil, fmt.Errorf("failed to get platform: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion backend/installfinders/launchers/steam/steam.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func getLibraryFoldersFromManifest(libraryFoldersManifestPath string) ([]string,
return nil, fmt.Errorf("failed to find library folders in manifest")
}

var libraryFolders []string
libraryFolders := make([]string, 0, len(libraryFoldersList))

for key, val := range libraryFoldersList {
if _, err := strconv.Atoi(key); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions backend/settings/smm2settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ func readSMM2Settings(data []byte) error {
s := smm2Settings{}
err := json.Unmarshal(data, &s)
if err != nil {
var invalidJsonError *json.SyntaxError
if errors.As(err, &invalidJsonError) {
var invalidJSONError *json.SyntaxError
if errors.As(err, &invalidJSONError) {
slog.Warn("invalid SMM2 settings JSON", slog.String("data", string(data)), slog.Any("err", err))
return nil // Ignore error, not much info there anyway
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/mods-list/ModsListItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
} else if('missing' in mod) {
compatibility = { state: CompatibilityState.Broken, note: $t('mod-list-item.unavailable', 'This mod is no longer available on ficsit.app. You may want to remove it.'), source: 'version' };
} else {
getCompatibility(mod.mod_reference, info.version, true).then((result) => {
getCompatibility(mod.mod_reference, client, true).then((result) => {
compatibility = {
...result,
source: 'version',
Expand Down

0 comments on commit ad4f421

Please sign in to comment.