Commit Graph

10 Commits

Author SHA1 Message Date
Jon Parise
c2eab3b43d macos: add root-level .swiftlint.yml
In order to support running from both the repository root and from
within Xcode project, and to keep things generally organized, our
primary .swiftlint.yml configuration file lives under macos/.

This change introduces a root-level .swiftlint.yml which limits the file
scope to macos/ and then includes macos/.swiftlint.yml for the rest of
the directives.

This unlocks a few benefits:

- We no longer need to pass an explicit `macos` path argument in any of
  our invocations. SwiftLint will do the right thing when run either
  from the repository root or from within the macos/ directory.
- It lets us easily exclude the macos/build/ directory (and re-enable
  the 'deployment_target' rule). In the previous setup, this was more
  challenging than you'd expect due to SwiftLint's path resolution rules
  and required passing even more arguments like `--working-directory`.

The only downside is adding a new file to the repository root, but that
feels like the right trade-off given the benefits and conveniences.
2026-02-20 09:21:04 -05:00
Jon Parise
21ea94610a macos: lint Swift files using SwiftLint
SwiftLint <https://realm.github.io/SwiftLint/> is both a linter and
formatting. It's a popular way to spot issues and enforce a consistent
style.

Our SwiftLint configuration lives in macos/.swiftlint.yml, where is is
automatically discovered. It's very configurable, and I made an initial
pass as some basic, weakly-opinionated rules. The "TODO" section lists
rules that currently have violations but can be easily (auto)fixed in
follow-up commits.

Our integration is CLI-based. Similar to our other support tools, we
expect developers to install `swiftlint` via nix or e.g. Homebrew.
This is documented in HACKING.md.

We also have an optional Xcode integration, for in-editor feedback. When
`swiftlint` is available, it's run as a script-based Build Phase.

SwiftLint supports an auto-fix mode (--fix). Agents are aware of this
via AGENTS.md.

The rules are enforced using a (nix-based) CI job.
2026-02-19 14:42:11 -05:00
Kat
98cc1c6d11 Move docs on developing Ghostty out of CONTRIBUTING.md, attempt two.
Follow-up to #8445, after a messed up rebase in #8339 brought it back
alongside an extra section.

All text removed from CONTRIBUTING.md was identical to the version
present in HACKING.md (according to a textual diff), excluding the
“Developer Guide” heading, the callout under it, and the “Nix VM
Integration Tests” section introduced in #8339.
2026-02-16 23:00:04 +11:00
Jon Parise
bf1ca59196 shellcheck: move common directives to .shellcheckrc
This simplifies our CI command line and makes it easier to document
expected usage (in HACKING.md).

There unfortunately isn't a way to set --checked-sourced or our default
warning level in .shellcheckrc, and our `find` command is still a bit
unwieldy, but this is still a net improvement.
2026-01-16 09:31:11 -05:00
Jeffrey C. Ollie
f8c03bb6f6 logging: document GHOSTTY_LOG and make it more flexible 2025-12-15 11:54:36 -08:00
Mike Akers
e8ebc6f405 docs: Update build requirements for macOS
Adds the Metal Toolchain as a required Xcode component for building
Ghostty. Also updates the notes about Xcode 26 now that it and Tahoe are
out of Beta.
2025-10-08 21:05:04 -04:00
azhn
928f5492dc Fix name of check-zig-cache.sh in documentation for updating the zig cache hash 2025-09-13 06:54:56 +10:00
Mitchell Hashimoto
ee573ebd36 ai: add gh-issue command to help diagnose GitHub issues
This enables agents (namely Amp) to use `/gh-issue <number/url>` to 
begin diagnosing a GitHub issue, explaining the problem, and suggesting
a plan of action. This action explicitly prompts the AI to not write
code.

I've used this manually for months with good results, so now I'm
formalizing it in the repo for other contributors.

Example diagnosing #8523:

https://ampcode.com/threads/T-3e26e8cc-83d1-4e3c-9b5e-02d9111909a7
2025-09-04 13:56:50 -07:00
Leah Amelia Chen
f802d33652 docs: divide content more evenly between CONTRIBUTING and HACKING
CONTRIBUTING should now solely be about the contribution *process*
while HACKING goes into the technical details
2025-08-29 06:14:41 +08:00
Leah Amelia Chen
2701932475 docs: separate out HACKING.md from README.md
Also did some copy-editing and removed some things that haven't been
present in the codebase for a while (I thought we nuked conformance
stuff in 1.1 already...?)
2025-08-29 06:14:36 +08:00