aboutsummaryrefslogtreecommitdiff
path: root/.github
AgeCommit message (Collapse)Author
2025-07-20Run tests against Emacs 30 (#372)Radon Rosborough
2024-04-13Add integration tests (#204)Radon Rosborough
Work in progress, some of the code is cribbed from https://github.com/radian-software/dumbparens
2024-03-30Prevent null issues when strings are unequal (#290)Ellis Kenyő
In the case where s2 is larger than s1, this errors because the index is out of range. A good testcase is the below ```lisp (apheleia--align-point " <div class=\"left-[40rem] fixed inset-y-0 right-0 z-0 hidden lg:block xl:left-[50rem]\">\n <svg\n" "<div class=\"left-[40rem] fixed inset-y-0 right-0 z-0 hidden lg:block xl:left-[50rem]\">\n <svg" 6) ``` If I've implemented the indexing wrong, do let me know but this seems to work just fine now for `mix` (the formatter that triggered this) --------- Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
2024-03-02Add changelog linter (#287)Radon Rosborough
This should help make sure we don't forget to document any important user-visible changes.
2023-11-23Test against Emacs 29 instead of master (#255)Radon Rosborough
<!-- To expedite the pull request process, please see the contributor guide for my projects: <https://github.com/raxod502/contributor-guide> -->
2023-10-17Restructure and refactor apheleia package (#215)Mohsin Kaleem
CLOSES #212 PR to restructure apheleia to make it more modular and improve some of the separation of concerns. Before merging we should make sure that we don't reintroduce the issues from #181.
2023-10-06Fix brittany formatter & misc improvements (#222)Radon Rosborough
* Fix brittany installation, needed the `--reorder-goals` argument to be added so that a version that was not the latest version could be installed so that it was compatible with the base lib version shipped with Ubuntu 20.04. We'll upgrade to 22.04 eventually (before it falls out of LTS). Ref: https://github.com/radian-software/apheleia/pull/221 * Add a `make fmt-build-common` target which allows tagging a docker image containing just the base software and not any formatters, to make it easy to debug formatter installation manually. * Update `apheleia-ft` to also run formatter tests when any files affecting a formatter are changed, which includes the installation script, the sample input/output, and also any scripts (e.g. `apheleia-phpcs`) that it uses. We don't have any logic that will run all formatter tests at once, because that is unwieldy. That can be done manually if making a big change. * Update to actions/checkout@v4 from v2 because the older one was listed as deprecated. * Print full stacktraces when `apheleia-ft` fails with an Elisp error.
2023-08-26Fix CI triggersRadon Rosborough
2022-09-03Add emacs-lisp formatting (#102)Ellis Kenyő
* feat: add emacs-lisp formatting * Disable indent-tabs-mode * Add stub file for installation * Fix lint errors * fix: correctly format based on previous mode * Formatting * Fix weird indent * Add checkindent target * Update changelog * Long line * Empty commit * fix ci * revert changelog reformatting * more changelog * more Co-authored-by: Radon Rosborough <radon.neon@gmail.com> Co-authored-by: Radon Rosborough <radon@intuitiveexplanations.com>
2022-04-10Support formatting remote files with Tramp (#76)Mohsin Kaleem
* [#33] Support remote buffers and files CLOSES #33 Adds support for formatting remote files. The new `apheleia-remote-algorithm` option configures this. The default behaviour is consistent with what we had before, with `apheleia` aborting a formatting when dealing with a remote file/buffer. Users can customise apheleia to run the formatter on the remote machine, in which case any temporary files or other checks such as `npx` will be fully handled on the remote machine. Users can also make apheleia run the formatter on the local machine. This works exactly like one would expect, except if the formatter requires access to the physical file (meaning it uses 'file in `apheleia-formatters`) because the file isn't available on the local machine. This PR also fixes a bug in apheleia where `input-fname` was assigned in local let scope, instead of being returned by `apheleia--format-command`, meaning any formatters using a 'input file weren't cleaned up after formatting. * Cleanup + run diffs on remote as well * Fix diff uses correct file path for remote files If a file being diffed is remote, but the program is being run locally, then we create a temporary file on the current machine. * Make a few style changes * Drop support for Emacs 25 * Fix GitHub Actions triggers * Don't run tests on Emacs 25 either * Make apheleia run synchronously when running on remote Also added a metadata field to function based formatters. * feat: Suppress meaningless messages while formatting synchronously Also fixed any linter complaints. * bug: Make running formatter locally on remote buffer synchronous More re-entrant tramp issues. * Update apheleia.el * review: Replace custom temp-file logic with make-nearby-temp-file * review: Revamp functional formatter interface * refactor: Rework remote file handling implementation + Reordered parameters to ensure remote always comes before callback. + Updated some docstrings. * bug: Re-add apheleia--make-temp-file We don't always want to create a temporary file on the remote, only when apheleia-remote-algorithm is 'remote. * bug: Prevent repeat diff-file invocation with 2 files Previously we always made a temp-file for diffing the formatted and unformatted buffer leading to a bug when trying to send stdin to the formatter process. Now we only perform this check when running both locally and remotely. * Update changelog Co-authored-by: Radon Rosborough <radon.neon@gmail.com>
2022-01-05Add formatter tests (#72)Radon Rosborough
Closes #24 Builds on #25 by @PrimaryCanary
2020-05-03Link to contributor guideRadon Rosborough
2020-03-19Add pull request templateRadon Rosborough