Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/pony-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: pony-lint

on:
pull_request:
paths:
- '**/*.pony'

concurrency:
group: pony-lint-${{ github.ref }}
cancel-in-progress: true

permissions:
packages: read

jobs:
pony-lint:
name: Lint Pony source
runs-on: ubuntu-latest
container:
image: ghcr.io/ponylang/shared-docker-ci-standard-builder:release
steps:
- uses: actions/checkout@v4.1.1
- name: Lint
run: pony-lint
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ Uses `corral` for dependency management (fetched automatically by the Makefile).

- `appdirs/appdirs.pony` - Core `AppDirs` class and public API
- `appdirs/known_folders.pony` - Windows FFI for `SHGetKnownFolderPath`
- `appdirs/windows_codepages.pony` - Windows codepage constants
- `appdirs/windows_code_pages.pony` - Windows codepage constants
- `appdirs/_test.pony` - PonyTest unit tests
- `examples/simple-example/` - Example usage

## Architecture

Single main class `AppDirs` with constructor parameters (`env_vars`, `app_name`, optional `app_author`, `app_version`, `roaming`, `osx_as_unix`) and eight public methods returning platform-appropriate directory paths. Platform logic is handled via `ifdef` compile-time conditionals. All public methods are partial (`?`) — they raise errors when the home directory is unavailable.
Single main class `AppDirs` with constructor parameters (`env_vars`, `app_name`, optional `app_author`, `app_version`, `roaming`, `osx_as_unix`) and eight public methods returning platform-appropriate directory paths. Platform logic is handled via a `_Platform` match type with `ifdef` used only at construction time. All public methods are partial (`?`) — they raise errors when the home directory is unavailable.

Windows support uses FFI to `SHGetKnownFolderPath`. macOS defaults to `~/Library/...` paths but can be switched to XDG via `osx_as_unix`. Linux/Unix uses XDG base directory spec with standard fallbacks.

## Conventions

- Follows [Pony standard library style guide](https://github.com/ponylang/ponyc/blob/main/STYLE_GUIDE.md) (80-column line limit)
- Follows [Pony standard library style guide](https://github.com/ponylang/ponyc/blob/main/STYLE_GUIDE.md) (80-column line limit), enforced by `pony-lint` in CI
- Test-file types annotated with `\nodoc\`
- Tests are platform-conditional using `ifdef` directives
- Squash merge only; PR titles become CHANGELOG entries
Loading