mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-11 16:24:11 +01:00
CI: Document "make lint", "make lint-go", & "make lint-js" targets #5330
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# PhotoPrism® Repository Guidelines
|
||||
|
||||
**Last Updated:** November 14, 2025
|
||||
**Last Updated:** November 21, 2025
|
||||
|
||||
## Purpose
|
||||
|
||||
@@ -141,6 +141,7 @@ Note: Across our public documentation, official images, and in production, the c
|
||||
- From within the Development Environment:
|
||||
- Full unit test suite: `make test` (runs backend and frontend tests)
|
||||
- Test frontend/backend: `make test-js` and `make test-go`
|
||||
- Linting: `make lint` (all), `make lint-go` (golangci-lint with `.golangci.yml`, prints findings without failing due to `--issues-exit-code 0`), `make lint-js` (ESLint/Prettier)
|
||||
- Go packages: `go test` (all tests) or `go test -run <name>` (specific tests only)
|
||||
- Need to inspect the MariaDB data while iterating? Connect directly inside the dev shell with `mariadb -D photoprism` and run SQL without rebuilding Go code.
|
||||
- Go tests live beside sources: for `path/to/pkg/<file>.go`, add tests in `path/to/pkg/<file>_test.go` (create if missing). For the same function, group related cases as `t.Run(...)` sub-tests (table-driven where helpful) and use **PascalCase** for subtest names (for example, `t.Run("Success", ...)`).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
PhotoPrism — Backend CODEMAP
|
||||
|
||||
**Last Updated:** November 14, 2025
|
||||
**Last Updated:** November 21, 2025
|
||||
|
||||
Purpose
|
||||
- Give agents and contributors a fast, reliable map of where things live and how they fit together, so you can add features, fix bugs, and write tests without spelunking.
|
||||
@@ -10,6 +10,7 @@ Quick Start
|
||||
- Inside dev container (recommended):
|
||||
- Install deps: `make dep`
|
||||
- Build backend: `make build-go`
|
||||
- Lint Go (golangci-lint): `make lint-go` (uses `.golangci.yml`; prints findings without failing) or run both stacks with `make lint`
|
||||
- Run server: `./photoprism start`
|
||||
- Open: http://localhost:2342/ or https://app.localssl.dev/ (Traefik required)
|
||||
- On host (manages Docker):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
PhotoPrism — Frontend CODEMAP
|
||||
|
||||
**Last Updated:** November 17, 2025
|
||||
**Last Updated:** November 21, 2025
|
||||
|
||||
Purpose
|
||||
- Help agents and contributors navigate the Vue 3 + Vuetify 3 app quickly and make safe changes.
|
||||
@@ -83,7 +83,7 @@ Testing
|
||||
Build & Tooling
|
||||
- Webpack is used for bundling; scripts in `frontend/package.json`:
|
||||
- `npm run build` (prod), `npm run build-dev` (dev), `npm run watch`
|
||||
- Lint/format: `npm run lint`, `npm run fmt`
|
||||
- Lint/format: `npm run lint` or `make lint-js`; repo root `make lint` runs both backend (golangci-lint via `.golangci.yml`) and frontend linters
|
||||
- Security scan: `npm run security:scan` (checks `--ignore-scripts` and forbids `v-html`)
|
||||
- Licensing: run `make notice` from the repo root to regenerate `NOTICE` files after dependency changes—never edit them manually.
|
||||
- Make targets (from repo root): `make build-js`, `make watch-js`, `make test-js`
|
||||
|
||||
Reference in New Issue
Block a user