Do not let the vendored md-ts-mode claim Markdown files globally (#157) #467
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # melpazoid <https://github.com/riscy/melpazoid> build checks. | |
| # Catches stylistic issues like top-level define-key, bolp suggestions, etc. | |
| name: melpazoid | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y emacs | |
| emacs --version | |
| git clone https://github.com/riscy/melpazoid.git ~/melpazoid | |
| - name: Install tree-sitter grammars | |
| run: emacs --batch -Q -L . -l scripts/install-ts-grammars.el | |
| - name: Run | |
| env: | |
| LOCAL_REPO: ${{ github.workspace }} | |
| RECIPE: (pi-coding-agent :fetcher github :repo "dnouri/pi-coding-agent") | |
| WARN_IS_ERROR: false | |
| EXIST_OK: true | |
| run: | | |
| # md-ts-mode.el is a standalone major mode with its own md-ts- | |
| # namespace. package-lint flags every symbol as not starting | |
| # with pi-coding-agent- — these are false positives. | |
| # Run melpazoid, tolerate its exit code, then check for errors | |
| # in files OTHER than md-ts-mode.el. | |
| make -C ~/melpazoid 2>&1 | tee /tmp/melpazoid.log || true | |
| # Melpazoid groups output by file under "⸺ `file.el`" headers. | |
| # Track current file; flag errors (line:col: error/Error) only | |
| # when outside md-ts-mode.el sections. | |
| awk ' | |
| /⸺ `[^`]+`/ { file=$0 } | |
| /[0-9]+:[0-9]+:.*[Ee]rror:/ && file !~ /md-ts-mode\.el/ { print; n++ } | |
| END { if(n) { printf "\n%d error(s) outside md-ts-mode.el\n",n; exit 1 } } | |
| ' /tmp/melpazoid.log |