stash/pkg/sqlite
SmallCoccinelle 8b7720e3bf
Enable the appendAssign lint check (#1865)
* Make copies of buffers

Avoid reusing one of the incoming arrays as a append extension, and
make a copy of the data. It's cleaner in the long run and possibly
easier for the GC to maintain.

* Avoid appendAssign problems in tag code

Reuse the existing slice when appending.

* Fix appendAssign in encoder_scene_preview_chunk

Appending and creating a new slice is somewhat unintuitive since the
underlying slice might be extended to satisfy the new capacity. This
sometimes leads to faulty logic.

Rewrite the code so it reuses `args` for all appending, and builds one
array clearly in the code. It follows the general style of the function
where `args` is being built in small incremental batches and avoids
the introduction of new names.

* Enable the appendAssign check

This makes us pass all gocritic warnings.

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2021-10-20 16:34:19 +11:00
..
filter.go Enable gocritic (#1848) 2021-10-18 14:12:40 +11:00
filter_internal_test.go Always wrap filter conditions in parentheses (#1577) 2021-07-14 18:29:59 +10:00
gallery.go Enable gocritic (#1848) 2021-10-18 14:12:40 +11:00
gallery_test.go Make hierarchical criterion depth input optional (#1733) 2021-09-16 20:41:07 +10:00
image.go Errorlint sweep + minor linter tweaks (#1796) 2021-10-12 14:03:08 +11:00
image_test.go Make hierarchical criterion depth input optional (#1733) 2021-09-16 20:41:07 +10:00
movies.go Enable gocritic (#1848) 2021-10-18 14:12:40 +11:00
movies_test.go Make hierarchical criterion depth input optional (#1733) 2021-09-16 20:41:07 +10:00
performer.go Enable gocritic (#1848) 2021-10-18 14:12:40 +11:00
performer_test.go Make hierarchical criterion depth input optional (#1733) 2021-09-16 20:41:07 +10:00
query.go Lint checks phase 2 (#1747) 2021-09-23 17:15:50 +10:00
repository.go Fixups + enable the commentFormatting linter (#1866) 2021-10-20 16:10:46 +11:00
saved_filter.go Errorlint sweep + minor linter tweaks (#1796) 2021-10-12 14:03:08 +11:00
saved_filter_test.go Apple Silicon Support, Bump Go to 1.17, refactor docker/build/x86_64/Dockerfile (#1646) 2021-09-08 15:30:15 +10:00
scene.go Enable gocritic (#1848) 2021-10-18 14:12:40 +11:00
scene_marker.go Enable gocritic (#1848) 2021-10-18 14:12:40 +11:00
scene_marker_test.go Fix scene marker sort by scene updated SQL error (#1777) 2021-09-27 12:26:38 +10:00
scene_test.go Make hierarchical criterion depth input optional (#1733) 2021-09-16 20:41:07 +10:00
scraped_item.go Errorlint sweep + minor linter tweaks (#1796) 2021-10-12 14:03:08 +11:00
setup_test.go Filter tag by hierarchy (#1746) 2021-10-01 11:50:06 +10:00
sql.go Enable gocritic (#1848) 2021-10-18 14:12:40 +11:00
stash_id_test.go Apple Silicon Support, Bump Go to 1.17, refactor docker/build/x86_64/Dockerfile (#1646) 2021-09-08 15:30:15 +10:00
studio.go Errorlint sweep + minor linter tweaks (#1796) 2021-10-12 14:03:08 +11:00
studio_test.go Fix Studio -> Stash ID filter (#1793) 2021-10-03 11:00:49 +11:00
tag.go Enable the appendAssign lint check (#1865) 2021-10-20 16:34:19 +11:00
tag_test.go Only group by if using having clauses (#1750) 2021-10-01 16:24:58 +10:00
transaction.go Errorlint sweep + minor linter tweaks (#1796) 2021-10-12 14:03:08 +11:00