stash/pkg
SmallCoccinelle a5ca8fc678
Enable safe linters (#1786)
* Enable safe linters

Enable the linters dogsled, rowserrcheck, and sqlclosecheck.

These report no errors currently in the code base.

Enable misspell.

Misspell finds two spelling mistakes in comments, which are fixed by the
patch as well.

Add and sort linters which are relatively
safe to add over time. Comment them out for now.

* Close the response body

If we can get a HTTP response, it has a body which ought to be closed.

By doing so, we avoid potentially leaking connections.

* Enable the exportloopref linter

There are two places in the code with these warnings. Fix them while
enabling the linter.

* Remove redundant types in tests

If a slice already determines the type, the inner type declaration is
redundant. Remove the inner declarations.

* Mark autotag test cases as parallel

Autotag test cases is by far the outlier when it comes to test time.
While go test runs test cases in parallel,
it doesn't do so inside a given package, unless one marks the test cases
as parallel.

This change provides a significant speedup on a 8-core machine for test
runs.
2021-10-03 11:48:03 +11:00
..
api Allow setting metadata directory from UI (#1782) 2021-10-03 11:35:30 +11:00
autotag Enable safe linters (#1786) 2021-10-03 11:48:03 +11:00
database Lint checks phase 2 (#1747) 2021-09-23 17:15:50 +10:00
dlna refactor: move from io/ioutil to io and os package (#1772) 2021-09-27 10:55:23 +10:00
ffmpeg refactor: move from io/ioutil to io and os package (#1772) 2021-09-27 10:55:23 +10:00
gallery Remove new-from-rev from the linter (#1783) 2021-09-28 09:29:45 +10:00
image Remove new-from-rev from the linter (#1783) 2021-09-28 09:29:45 +10:00
job Fix data race in progress_test (#1696) 2021-09-07 13:30:26 +10:00
logger Enable safe linters (#1786) 2021-10-03 11:48:03 +11:00
manager Enable safe linters (#1786) 2021-10-03 11:48:03 +11:00
models Add movie count to performer and studio card (#1760) 2021-09-27 11:31:49 +10:00
movie Enable safe linters (#1786) 2021-10-03 11:48:03 +11:00
performer Enable safe linters (#1786) 2021-10-03 11:48:03 +11:00
plugin Enable safe linters (#1786) 2021-10-03 11:48:03 +11:00
scene Remove new-from-rev from the linter (#1783) 2021-09-28 09:29:45 +10:00
scraper Enable safe linters (#1786) 2021-10-03 11:48:03 +11:00
session Remove unused (#1709) 2021-09-09 14:10:08 +10:00
sqlite Fix Studio -> Stash ID filter (#1793) 2021-10-03 11:00:49 +11:00
static Replace packr with go embed (#1751) 2021-09-22 13:08:34 +10:00
studio Enable safe linters (#1786) 2021-10-03 11:48:03 +11:00
tag Remove new-from-rev from the linter (#1783) 2021-09-28 09:29:45 +10:00
utils refactor: move from io/ioutil to io and os package (#1772) 2021-09-27 10:55:23 +10:00