diff --git a/etc/NEWS b/etc/NEWS index aab605f999b..2ee0df5650d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -65,6 +65,11 @@ package with the same version. This is useful if you have started making local changes to your tarball installation, and then decided to check out the repository to prepare a patch for the package maintainer. +** Compilation mode + +--- +*** Messages from Ansible are now recognized. + * New Modes and Packages in Emacs 32.1 diff --git a/etc/compilation.txt b/etc/compilation.txt index b97ba12fb9a..323ef8cf3c0 100644 --- a/etc/compilation.txt +++ b/etc/compilation.txt @@ -41,6 +41,24 @@ symbol: aix ****** Error number 140 in line 8 of file errors.c ****** +* Ansible + +symbols: ansible-error ansible-fatal ansible-warning + ansible-included ansible-origin + +[ERROR]: couldn't resolve module/action 'shelll'. This often indicates a misspelling, missing collection, or incorrect module path. +Origin: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml:19:3 +[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg. +[DEPRECATION WARNING]: Importing 'to_bytes' from 'ansible.module_utils._text' is deprecated. This feature will be removed from ansible-core version 2.24. Use ansible.module_utils.common.text.converters instead. +included: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml for localhost => (item={'name': 'adb', 'start': '04157df41d46b840'}) +fatal: [localhost]: FAILED! => { + "assertion": "message == []", + "changed": false, + "evaluated_to": false, + "msg": "Assertion failed" +} + + * Ant Java: works at least for jikes and javac symbol: ant @@ -161,7 +179,7 @@ cucumber foo/cucumber.feature:15 # Scenario: deep backtrace in step definition * EDG C/C++ -symbol: edg-1 edg-2 +symbols: edg-1 edg-2 build/intel/debug/../../../struct.cpp(42): error: identifier "foo" is undefined build/intel/debug/../../../struct.cpp(44): warning #1011: missing return statement at end of ... @@ -178,7 +196,7 @@ Error 24 at (2:progran.f90) : syntax error * Fortran checker -symbols: ftnchek +symbol: ftnchek Dummy arg W in module SUBA line 8 file arrayclash.f is array L4 used at line 55 file test/assign.f; never set @@ -336,7 +354,7 @@ boost/container/detail/flat_tree.hpp:589:25: [ skipping 5 instantiation contex * Guile backtrace, 2.0.11 -symbols: guile-file, guile-line +symbols: guile-file guile-line Backtrace: In ice-9/boot-9.scm: @@ -356,6 +374,8 @@ In /home/janneke/vc/guile/examples/gud-break.scm: * Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT 2.1 +symbols: lua lua-stack + /usr/bin/lua: database.lua:31: assertion failed! stack traceback: [C]: in function 'assert' @@ -490,7 +510,7 @@ Fatal error: Call to undefined function: mysql_pconnect() in db.inc on line 66 * Rust -symbol: rust rust-panic +symbols: rust rust-panic error[E0277]: `Foo` is not an iterator --> src/main.rs:4:16 @@ -612,7 +632,7 @@ bloofle defined( /users/wolfgang/foo.c(4) ), but never used * GCOV (test coverage program) -symbol: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line +symbols: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line -: 0:Source:foo.c -: 0:Object:foo.bb diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index fbcdc6b5124..593f9867533 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -229,6 +229,19 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) (aix " in line \\([0-9]+\\) of file \\([^ \n]+[^. \n]\\)\\.? " 2 1) + (ansible-fatal + "^fatal: .*: FAILED!" nil nil nil 2 0 (0 compilation-error-face)) + (ansible-error + "^\\[ERROR\\]:" + nil nil nil 2 0 (0 compilation-error-face)) + (ansible-warning + "^\\[\\(?:DEPRECATION \\)?WARNING\\]:" + nil nil nil 1 0 (0 compilation-warning-face)) + (ansible-included "^included: \\([^[:space:]]+\\)" 1 nil nil 0 1) + (ansible-origin + "^Origin: \\([^[:space:]]+\\):\\([[:digit:]]+\\):\\([[:digit:]]+\\)" + 1 2 3 0 1) + ;; Checkstyle task may report its own severity level: "[checkstyle] [ERROR] ..." ;; (see AuditEventDefaultFormatter.java in checkstyle sources). (ant diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el index caf386b4950..cd8e41c3dfb 100644 --- a/test/lisp/progmodes/compile-tests.el +++ b/test/lisp/progmodes/compile-tests.el @@ -52,6 +52,17 @@ ;; aix (aix "****** Error number 140 in line 8 of file errors.c ******" 25 nil 8 "errors.c" error) + ;; Ansible + (ansible-error "[ERROR]: couldn't resolve module/action 'shelll'. This often indicates a misspelling, missing collection, or incorrect module path." + 1 nil nil nil error) + (ansible-fatal "fatal: [localhost]: FAILED! => {" + 1 nil nil nil error) + (ansible-warning "[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg." + 1 nil nil nil warning) + (ansible-included "included: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml for localhost => (item={'name': 'adb', 'start': '04157df41d46b840'})" + 11 nil nil "/home/albinus/src/tramp-tests/roles/test/tasks/adb.yml" info) + (ansible-origin "Origin: /home/albinus/src/tramp-tests/roles/test/tasks/adb.yml:19:3" + 9 3 19 "/home/albinus/src/tramp-tests/roles/test/tasks/adb.yml" info) ;; ant (ant "[javac] /src/DataBaseTestCase.java:27: unreported exception ..." 13 nil 27 "/src/DataBaseTestCase.java" error) @@ -561,7 +572,7 @@ The test data is in `compile-tests--test-regexps-data'." (should (eq compilation-num-errors-found 111)) (should (eq compilation-num-warnings-found 37)) - (should (eq compilation-num-infos-found 36))))) + (should (eq compilation-num-infos-found 38))))) (ert-deftest compile-test-grep-regexps () "Test the `grep-regexp-alist' regexps.