Skip to content

Conversation

@meedstrom
Copy link

@meedstrom meedstrom commented Nov 7, 2025

This code is just one way to do it. It shows that the implementation can be simple.

It enables you to mark boundaries of regions in which not to lint the line-lengths. Example:

(defconst some-huge-verbatim-sql-code-string  ;; <elisp-lint-ignore-fill>
  "
SELECT
        title,
        aliases,
        id,
        file,
        filetitle,
        \"level\",
        todo,
        pos,
        priority,
        scheduled,
        deadline,
        properties,
        olp,
        atime,
        mtime,
        '(' || group_concat(tags, ' ') || ')' AS tags,
        refs
FROM (
        SELECT
                id,
                file,
                filetitle,
                \"level\",
                todo,
                pos,
                priority,
                scheduled,
                deadline,
                title,
                properties,
                olp,
                atime,
                mtime,
                tags,
                '(' || group_concat(aliases, ' ') || ')' AS aliases,
                refs
        FROM (
                SELECT
                        nodes.id AS id,
                        nodes.file AS file,
                        nodes.\"level\" AS \"level\",
                        nodes.todo AS todo,
                        nodes.pos AS pos,
                        nodes.priority AS priority,
                        nodes.scheduled AS scheduled,
                        nodes.deadline AS deadline,
                        nodes.title AS title,
                        nodes.properties AS properties,
                        nodes.olp AS olp,
                        files.atime AS atime,
                        files.mtime AS mtime,
                        files.title AS filetitle,
                        tags.tag AS tags,
                        aliases.alias AS aliases,
                        '(' || group_concat(RTRIM(refs. \"type\", '\"') || ':' || LTRIM(refs.ref, '\"'), ' ') || ')' AS refs
                FROM
                        nodes
                LEFT JOIN files ON files.file = nodes.file
                LEFT JOIN tags ON tags.node_id = nodes.id
                LEFT JOIN aliases ON aliases.node_id = nodes.id
                LEFT JOIN refs ON refs.node_id = nodes.id
        GROUP BY
                nodes.id,
                tags.tag,
                aliases.alias)
GROUP BY
        id,
        tags)
GROUP BY
        id
") ;; <elisp-lint-resume-fill>

In the interest of simple UX, I think it'd make sense to generalize this to just ;; <elisp-lint-ignore>, ignoring all linters and not just the fill-column linter, but I don't know if that may complicate the implementation.

Another good idea is #37, but elisp-lint does seem to operate on a line-by-line basis, so covering sexps would probably require a heavier refactor.

@meedstrom meedstrom force-pushed the add-magic-skip-comment branch from d2e40a2 to 03ea5ff Compare November 7, 2025 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant