Skip to content

Add CI and linters for FolderSync - #5

Merged
joshyunho merged 1 commit into
mainfrom
foldersync/ci
Oct 29, 2026
Merged

joshyunho merged 1 commit into
mainfrom
foldersync/ci

Conversation

@joshyunho

Copy link
Copy Markdown
Collaborator

Summary

Adds CI and the linters it runs.

Workflows (.github/workflows/)

  • foldersync.yml, on every pull request and push to main:
    • App, on macOS: npm run lint, npm run format:check, npm run typecheck, npm test
    • Token server, on Linux: go vet, go test, golangci-lint, govulncheck
    • ShellCheck for scripts/start.sh
    • After a merge (or when run by hand): builds FolderSync-mac-arm64.zip and keeps it as a workflow artifact for 30 days
  • workflows.yml: actionlint for the workflows
  • codeql.yml: CodeQL for Go and TypeScript on pull requests, pushes to main, and weekly

Linters

  • ESLint with the typescript-eslint and package-json recommended rules. typescript-eslint needs the TypeScript 6 API, so typescript is now @typescript/typescript6, and the compiler stays on TypeScript 7 as @typescript/native.
  • Prettier, with the settings the code already used (.prettierrc.json)
  • Stylelint, with stylelint-config-standard and stylelint-css-modules
  • golangci-lint 2.15 with gofmt, goimports, go vet, staticcheck, unused, and ineffassign. CI builds it with the job's Go, since older builds can't read Go 1.27 packages.

Fixes the linters asked for

  • Errors thrown from a catch now keep the original error as cause. Messages don't change.
  • A condition in tokenserver/main.go is rewritten with De Morgan's law, with the same meaning.
  • package.json sets "type": "commonjs", the default, and sorts its scripts.
  • One script's formatting, and two unused test parameters.

AGENTS.md, CONTRIBUTING.md, and FolderSync's README list the new commands. CONTRIBUTING.md now asks for Go 1.27.3, to match go.mod.

Test plan

  • From a clean copy with npm ci: lint, format check, typecheck, and npm test (290 tests) pass
  • go vet, go test, golangci-lint 2.15.0, and govulncheck pass on Go 1.27.3
  • ShellCheck and actionlint pass
  • npm run build:tokenserver && npm run package builds the zip from the clean copy
  • The workflows run for the first time on this pull request

GitHub Actions now lints, typechecks, and tests the app and the token
server on every pull request, and builds the macOS zip after each merge.
ESLint, Prettier, Stylelint, golangci-lint, and ShellCheck are set up,
and the code is fixed to pass them.
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@joshyunho
joshyunho marked this pull request as ready for review October 29, 2026 20:12
@joshyunho
joshyunho requested a review from pselden October 29, 2026 20:12
@joshyunho
joshyunho merged commit 7b599a5 into main Oct 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants