1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 07:11:34 -08:00
emacs/doc/misc
João Távora 8118f0f95f Fix three Flymake bugs when checking C header files
The first of these problems is longstanding: if an error-less B.h is
included from error-ridden A.h, flymake's legacy parser will panic
(and disable itself) since it sees a non-zero exit for a clean file.
To fix this, recommend returning 'true' in the documentation for the
check-syntax target.

Another problem was introduced by the parser rewrite.  For error
patterns spanning more than one line, point may be left in the middle
of a line and thus render other patterns useless.  Those patterns were
written for the old line-by-line parser.  To make them useful again,
move to the beginning of line in those situations.

The third problem was also longstanding and happened on newer GCC's:
The "In file included from" prefix confused
flymake-proc-get-real-file-name.  Fix this.

Also updated flymake--diag-region to fallback to highlighting a full
line less often.

Add automatic tests to check this.

* lisp/progmodes/flymake-proc.el
(flymake-proc--diagnostics-for-pattern): Fix bug when patterns
accidentally spans more than one line.  Don't create
diagnostics without error messages.
(flymake-proc-real-file-name-considering-includes): New
helper.
(flymake-proc-allowed-file-name-masks): Use it.

* lisp/progmodes/flymake.el (flymake-diag-region): Make COL
argument explicitly optional.  Only fall back to full line in extreme
cases.

* test/lisp/progmodes/flymake-tests.el
(included-c-header-files): New test.
(different-diagnostic-types): Update.

* test/lisp/progmodes/flymake-resources/Makefile
(check-syntax): Always return success (0) error code.
(CC_OPTS): Add -Wextra

* test/lisp/progmodes/flymake-resources/errors-and-warnings.c
(main): Rewrite comments.

* test/lisp/progmodes/flymake-resources/errors-and-warnings.c:
Include some dummy header files.

* test/lisp/progmodes/flymake-resources/no-problems.h: New file.

* test/lisp/progmodes/flymake-resources/some-problems.h: New file.

* doc/misc/flymake.texi (Example---Configuring a tool called
via make): Recommend adding "|| true" to the check-syntax target.
2017-10-03 14:18:55 +01:00
..
ada-mode.texi Fix a typo in ada-mode manual 2017-02-07 18:29:02 +02:00
auth.texi * doc/misc/auth.texi: Commas don't work in node names. 2017-04-27 21:33:07 -07:00
autotype.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
bovine.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
calc.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
cc-mode.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
ChangeLog.1 Prefer HTTPS to HTTP for gnu.org 2017-09-29 17:48:22 -07:00
cl.texi Prefer HTTPS to HTTP for gnu.org 2017-10-01 19:59:01 -07:00
dbus.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
dired-x.texi dired-mark-suffix: New command 2017-03-31 17:27:08 +09:00
doclicense.texi Merge from Gnulib 2017-10-01 18:31:10 -07:00
ebrowse.texi Be more consistent about "directory name" in manual 2017-09-09 13:41:20 -07:00
ede.texi Be more consistent about "directory name" in manual 2017-09-09 13:41:20 -07:00
ediff.texi Show ancestor buffer in 3way merges 2017-03-14 16:12:29 +09:00
edt.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
efaq-w32.texi Prefer HTTPS to HTTP for gnu.org 2017-10-01 19:59:01 -07:00
efaq.texi Prefer HTTPS to HTTP for gnu.org 2017-10-01 19:59:01 -07:00
eieio.texi Make EIEIO use records. 2017-04-04 08:23:46 +02:00
emacs-gnutls.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
emacs-mime.texi * lisp/net/html2text.el: Move to obsolete/. 2017-06-24 08:59:20 -04:00
epa.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
erc.texi Prefer HTTPS to HTTP for gnu.org 2017-10-01 19:59:01 -07:00
ert.texi Remove stale functions from ert manual 2017-01-27 11:49:42 +02:00
eshell.texi eshell.texi improvements 2017-10-01 13:31:39 +02:00
eudc.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
eww.texi Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
flymake.texi Fix three Flymake bugs when checking C header files 2017-10-03 14:18:55 +01:00
forms.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
gnus-coding.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
gnus-faq.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
gnus-news.el Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
gnus-news.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
gnus-overrides.texi gnus-overrides.texi: Renamed from overrides.texi and all the relevant manuals use it now. 2011-02-06 00:25:41 +00:00
gnus.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
gpl.texi Merge from Gnulib 2017-10-01 18:31:10 -07:00
htmlfontify.texi Be more consistent about "directory name" in manual 2017-09-09 13:41:20 -07:00
idlwave.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
ido.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
info.texi ;* doc/misc/info.texi (Choose menu subtopic): Improve indexing. (Bug#26236) 2017-03-25 10:46:59 +03:00
mairix-el.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
Makefile.in Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
message.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
mh-e.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
newsticker.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
nxml-mode.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
octave-mode.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
org.texi Fix reference style in org.texi 2017-10-01 10:30:33 +02:00
pcl-cvs.texi Prefer HTTPS to HTTP for gnu.org 2017-10-01 19:59:01 -07:00
pgg.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
rcirc.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
reftex.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
remember.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
sasl.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
sc.texi Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
sem-user.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
semantic.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
ses.texi Fix symbol completion and document it. 2017-07-17 19:58:12 +02:00
sieve.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
smtpmail.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
speedbar.texi Merge from origin/emacs-25 2017-01-01 01:10:47 -08:00
srecode.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
texinfo.tex Merge from Gnulib 2017-09-17 13:06:54 -07:00
todo-mode.texi Update copyright year to 2017 2016-12-31 19:42:26 -08:00
tramp.texi Minor Tramp doc update 2017-09-18 18:00:07 +02:00
trampver.texi Adapt Tramp version. Do not merge 2017-09-17 10:03:18 +02:00
url.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
vhdl-mode.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
vip.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
viper.texi Remove references to OS/2 in code, doc, and comments 2017-04-08 13:16:08 -07:00
widget.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
wisent.texi Fix copyright years by hand 2017-01-01 04:01:41 +00:00
woman.texi Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00