https://github.com/gemmaro/flymake-sqlite
[MIRROR] Emacs Flymake backend for SQLite3.
https://github.com/gemmaro/flymake-sqlite
emacs flymake sql sqlite
Last synced: 3 days ago
JSON representation
[MIRROR] Emacs Flymake backend for SQLite3.
- Host: GitHub
- URL: https://github.com/gemmaro/flymake-sqlite
- Owner: gemmaro
- License: gpl-3.0
- Created: 2026-06-24T17:47:52.000Z (5 days ago)
- Default Branch: main
- Last Pushed: 2026-06-24T21:24:23.000Z (5 days ago)
- Last Synced: 2026-06-24T22:10:23.117Z (5 days ago)
- Topics: emacs, flymake, sql, sqlite
- Language: C
- Homepage: https://codeberg.org/gemmaro/flymake-sqlite
- Size: 25.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# Flymake SQLite
This is a Flymake backend for SQLite.
Project links: [repository][cb], [mirror][gh]
It can parse and check the SQL files; basically it checks the syntax
and, if the database filename is specified, it checks whether tables
and columns do exist or not.
See also the commentary section and docstrings in the package file.
[cb]: https://codeberg.org/gemmaro/flymake-sqlite
[gh]: https://github.com/gemmaro/flymake-sqlite
## Install
It requires SQLite C interface (at least version 3.38.0 or later[^1]) to
build the dynamic module.
[^1]: Because this package requires `sqlite3_error_offset()`
introduced in the [3.38.0 on 2022-02-22][3-38-0].
To build the module, run `make`. If you use GCC, `make CC=gcc` to
compile the dynamic module. Some platform might requires additional
adjustments, so please refer to the `Makefile`.
[3-38-0]: https://sqlite.org/releaselog/3_38_0.html#:~:text=Added%20the%20sqlite3%5Ferror%5Foffset%28%29%20interface%2C%20which%20can%20sometimes%20help%20to%20localize%20an%20SQL%20error%20to%20a%20specific%20character%20in%20the%20input%20SQL%20text%2C%20so%20that%20applications%20can%20provide%20better%20error%20messages%2E
## Change Log
* 0.2.0 - 2026-06-25:
* Change: Try to use `require` first to load the module.
* Improve: error reporting range for logic errors.
* Improve: platform compatibility for dynamic module suffix (e.g. `.so`).
* 0.1.0 - 2026-06-25: Initial release.
## Development
There are some fixture files under the `fixtures` directory. To
create a dummy database for the okay case (`fixtures/ok1.sql`), run
`./bin/setup`. To check if the package works, run `./bin/start` and
open fixtures.
Currently no unit tests available. I manually test these in addition
to the basic check with `make check`:
* Open fixture files for expected errors/no-errors.
* Try edit a bit for okay files. Sometimes this causes unexpected
error reporting.
* Try to edit & save files.
`tools/memo.c` is a C API playground.
If you are using Guix and Direnv, run `direnv allow .` to install
necessary packages.
References: [SQLite C Interface][s], [My previous attempt to write a
Flymake backend][pc]
[pc]: https://github.com/flymake/emacs-flymake-perlcritic
[s]: https://sqlite.org/c3ref/funclist.html
## License
Copyright (C) 2026 gemmaro
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .