unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: "João Távora" <joaotavora@gmail.com>
Cc: sir@hacktivista.com, 40351-done@debbugs.gnu.org
Subject: bug#40351: Flymake error count
Date: Mon, 12 Dec 2022 00:50:42 -0800	[thread overview]
Message-ID: <CADwFkmkohw6EB2_YSXX=6B3=4T9WrPsSAbkBAbLqvwAnofuXBw@mail.gmail.com> (raw)
In-Reply-To: <87r1vpatvt.fsf@gmail.com> ("João Távora"'s message of "Tue, 12 May 2020 19:30:14 +0100")

João Távora <joaotavora@gmail.com> writes:

> Hello, sir@hacktivista.com:
>
> I'm sorry for the very long delay in answering this.  Next time you
> report a bug for flymake, make sure you also forward me the message that
> the bug reporting system sends back to you.  (yes I know you had written
> me separately).
>
> Anyway, to your problem:
>
>
>>                        for (beg . end) = (flymake-diag-region source lnum)
>>                        for type = (make-symbol (match-string 3))
>                                      ^^^^^^^^^^^
>
> I think the problem you experience is found here.  TYPE cannot be a
> different symbol for each error you find, otherwise Flymake will think
> that each error has its unique type.  If `(match-string 3)` is indeed
> often enough the same string, you can try `intern` instead.
>
> Let's say (match-string 3) can only return "oops", "warn" or "info" I would write
> that line like
>
>     for type = (intern (format "flymake-phpcs--%s" (match-string 3)))
>
> Then separately I would write in a top-level-form
>
>     (put 'flymake-phpcs--oops 'flymake-category 'flymake-error)
>     (put 'flymake-phpcs--warn 'flymake-category 'flymake-warning)
>     (put 'flymake-phpcs--info 'flymake-category 'flymake-note)
>
> Then the errors would be merged with the errors from Eglot, I think.
>
> See the manual section 2.1 Customizing Flymake error types
>
> I see the the docstring for `flymake-make-diagnostic` could see some
> improvement.  In particular, the phrase "TYPE is a key to symbol"
> doesnt' make much sense.

There have been no further replies here within 2.5 years, so I'm going
to assume the above was enough to resolve this issue.  I'm therefore
closing this bug report.

If this conclusion is incorrect and this is still an issue, please reply
to this email (use "Reply to all" in your email client) and we can
reopen the bug report.





      reply	other threads:[~2022-12-12  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 10:21 bug#40351: Flymake error count sir
2020-05-12 18:30 ` João Távora
2022-12-12  8:50   ` Stefan Kangas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmkohw6EB2_YSXX=6B3=4T9WrPsSAbkBAbLqvwAnofuXBw@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=40351-done@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    --cc=sir@hacktivista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).