Flycheck warning in Emacs’ *Messages* buffer are not displayed correctly - emacs

The following is an example of how my flycheck errors show up on emacs:
Method name "createQATask" doesn't conform to
'[a-z_][a-z0-9_]{2,30}$' pattern [invalid-name]
Here are the checkers I’m running (checked through C-c ! v):
Syntax checkers for buffer __manifest__.py in python-mode:
First checker to run:
python-flake8
- may enable: yes
- executable: Found at /usr/bin/python3
- configuration file: Not found
- `flake8' module: Found at "/home/devdesk4/.local/lib/python3.5/site-packages/flake8/__init__.py"
- next checkers: python-pylint, python-mypy
Checkers that may run as part of the first checker's chain:
python-pylint
- may enable: yes
- executable: Found at /usr/bin/python3
- configuration file: Found at "/home/devdesk4/.pylintrc"
- `pylint' module: Found at "/home/devdesk4/.local/lib/python3.5/site-packages/pylint/__init__.py"
- next checkers: python-mypy
Checkers that could run if selected:
python-pycompile select
- may enable: yes
- executable: Found at /usr/bin/python3
- next checkers: python-mypy
I’ve tried disabling python-pylint’s configuration file, but the behavior still remains. I’ve also tried a minimal .emacs configuration which only contained the following:
(setq package-archives
'(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")
("melpa-stable" . "https://stable.melpa.org/packages/")))
(use-package flycheck
:ensure t
:init
(global-flycheck-mode t))
Are those symbols (", ') not being displayed properly, or is this some sort of default flycheck configuration that I can override?
April 25, 2020 Update (Possible Solution)
Weirdly, I executed pip install --upgrade pylint just to check if I really had the latest version of pylint, and it upgraded from 2.3.0 to 2.4.4, and that fixed the issue.
However, this solution conflicts with using https://pypi.org/project/pylint-odoo/, because it reverts me back to version 2.3.0 which has those html-escape sequences.
Same-day update
It’s confirmed to be an upstream bug in Pylint.

The following is an example of how my flycheck errors show up on emacs:
Method name "createQATask" doesn't conform to '[a-z_][a-z0-9_]{2,30}$' pattern [invalid-name]
The linter evidentially believes it should be producing HTML output.
By the looks of it you are running all of python-flake8, python-pylint, and python-mypy. I suggest that you firstly test them one at a time to establish which one is producing that output, and then look at the documentation for that tool to find out how to prevent it from generating HTML.

Related

How Do I Alias Alembic Provided Dependencies?

If I evaluate the following in Emacs Cider:
(use 'alembic.still)
(alembic.still/distill '[enlive "1.1.5"])
(require '[net.cgrand.enlive-html :as html])
(html)
... evaluation of the (html) to see if it's a recognized symbol produces an 'Unable to resolve symbol' error. I'm evaluating it via cider connected to a REPL.
How can I use Alembic provided dependencies as an alias?
Your code is not working because html is an alias for a namespace here, not a symbol. The functions from enlive should work, however:
(use 'alembic.still)
(alembic.still/distill '[enlive "1.1.5"])
(require '[net.cgrand.enlive-html :as html])
(html/html-snippet "<div>Hello world</div>")

Emacs autocomplete error : running timer

I tryed to install autocomplete mode for emacs, downloaded it from the elpa repository, with
M-x list-packages
And when I try it, the mode gives me an error
Error running timer ‘ac-update-greedy’: (error "Keyword argument :max-width not one of (:min-height :around :face :mouse-face :selection-face :scroll-bar :margin-left :margin-right :symbol :parent :parent-offset :keymap)")
Error running timer ‘ac-show-menu’: (error "Keyword argument :max-width not one of (:min-height :around :face :mouse-face :selection-face :scroll-bar :margin-left :margin-right :symbol :parent :parent-offset :keymap)")
And it fails even if I don't load each other mod. Even If I manually run
M-x auto-complete-mode
Where can this error come from ?
Ok, I found the answer. So I'll just post it there in case somebody is in the same situation,
The problem came from popup.el, a required package for auto-complete.
I downloaded the sources, recompiled them, and added the new popup.el in my mod folder
And it worked !

How should I configure Vulkan for cider-jack-in?

I'm working through the newly released Vulkan Tutorial in Clojure with CIDER, and I've hit a bit of a snag. The example makefile project works perfectly, but I'm having trouble translating it into Clojure.
My build.boot file just specifies the :source-paths and adds LWJGL as a dependency:
(set-env!
:source-paths #{"src"}
:dependencies
(let [lwjgl-version "3.0.0"]
[['org.lwjgl/lwjgl lwjgl-version]
['org.lwjgl/lwjgl-platform lwjgl-version :classifier "natives-linux"]]))
Then, in src/example/core.clj, I have an extension-count function that uses vkEnumerateInstanceExtensionProperties as demonstrated in the original example:
(ns example.core
(:import (org.lwjgl.vulkan VK10)))
(defn extension-count []
(let [^String layer-name nil
property-count (int-array 1)]
(VK10/vkEnumerateInstanceExtensionProperties layer-name property-count nil)
(first property-count)))
Now, from Bash, I can set the relevant environment variables LD_LIBRARY_PATH and VK_LAYER_PATH as I start up a REPL:
$ VULKAN_SDK_PATH=~/VulkanSDK/1.0.21.1/x86_64 LD_LIBRARY_PATH=$VULKAN_SDK_PATH/lib VK_LAYER_PATH=$VULKAN_SDK_PATH/etc/explicit_layer.d boot repl
boot.user=> (require '[example.core :refer [extension-count]])
nil
boot.user=> (extension-count)
4
As you can see, everything works correctly. But of course, when I use cider-jack-in by C-c M-j instead, I get an UnsatisfiedLinkError because CIDER isn't setting those variables:
boot.user> (import (java.util.function Consumer)
(org.lwjgl.system Configuration))
org.lwjgl.system.Configuration
boot.user> (Configuration/setDebugStreamConsumer
(reify Consumer
(accept [_ message]
(println message))))
nil
boot.user> (require '[example.core :refer [extension-count]])
nil
boot.user> (extension-count)
[LWJGL] Failed to load a library. Possible solutions:
a) Set -Djava.library.path or -Dorg.lwjgl.librarypath to the directory that contains the shared libraries.
b) Add the JAR(s) containing the shared libraries to the classpath.
[LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
java.lang.UnsatisfiedLinkError: Failed to locate library: libvulkan.so.1
Am I supposed to be setting java.library.path or org.lwjgl.librarypath, as suggested in the above error message, instead of LD_LIBRARY_PATH? I can set either of those variables from profile.boot:
(System/setProperty
"java.library.path"
(str (System/getProperty "user.home") "/VulkanSDK/1.0.21.1/x86_64/lib"))
Now when I try C-c M-j again, it works:
boot.user> (require '[example.core :refer [extension-count]])
nil
boot.user> (extension-count)
4
However, this still doesn't let me set VK_LAYER_PATH, which will be fairly important in the future:
We will start using validation layers in Vulkan and you need to tell the Vulkan library where to load these from using the VK_LAYER_PATH variable:
test: VulkanTest
LD_LIBRARY_PATH=$(VULKAN_SDK_PATH)/lib VK_LAYER_PATH=$(VULKAN_SDK_PATH)/etc/explicit_layer.d ./VulkanTest
How can I set these environment variables for cider-jack-in? I'd prefer not to have to manually configure CIDER's dependencies for a standalone repl in a separate terminal and then connect to it using cider-connect, but if there's no other option here, I guess that's what I'll have to do.

Flycheck-Google-Cpplint is not Configured Correctly

I am trying to install flycheck-google-cpplint in my emacs. But I get this error:
(flycheck-mode 1)
(eval-after-load 'flycheck
'(progn
(require 'flycheck-google-cpplint)
(flycheck-add-next-checker 'c/c++-cppcheck
'c/c++-googlelint 'append)))
(custom-set-variables
'(flycheck-googlelint-verbose "3")
'(flycheck-googlelint-filter "-whitespace,+whitespace/braces"))
But this does not work. I get the following error:
Error: (user-error "Configured syntax checker c/c++-googlelint cannot be used")
I don't know why. I installed cpplint and it works fine if I used it from the command line. Any suggestion?
flycheck-google-lint uses cpplint. You have to tell emacs where to find the cpplint.py executable in order to run the syntax check.
You can find the cpplint file here.
Then, you need to add this to your init emacs file:
(custom-set-variables
'(flycheck-c/c++-googlelint-executable "/path/to/cpplint.py"))

Emacs VHDL jump to error

I cannot make emacs to jump to next-error, previous-error, first-error in vhdl-mode.
I am using FSF Emacs 23.3.1 with recent vhdl-mode 3.33.28 under ubuntu.
I can compile with Modelsim and I get compiler error list:
-- Loading package standard
-- ...
-- Compiling entity foo
** Error: path/foo.vhd(22): (vcom-1136) Unknown identifier "std_olgic".
I tried to adapt error regexp (in compiler-setup) to the simplest one:
\*\* Error: \([a-zA-Z\/_.]*\)(\([0-9]*\)).*
When I use it this way I can see that it parses errors correctly:
sed "s/\*\* Error: \([a-zA-Z\/_.]*\)(\([0-9]*\)).*/\1 \2/" ...
path/foo.vhd 22
I changed "File subexp index" and "Line subexp index" respectively to 1 and 2 but still I cannot jump around errors.
The following config resolves this bug for me
'(vhdl-compile-use-local-error-regexp t)
(add-to-list 'compilation-error-regexp-alist '("** Error: \\(.+\\)(\\([0-9]*\\)):" 1 2))
In Emacs regexps, you need to double-escape parens in a string (explanation). Try something like this: \*\* Error: \\([a-zA-Z0-9/_.]+\\)(\\([0-9]+\\)).*
Sorry to bump an old topic but I just ran into this issue and got things to work out for me.
Here are the settings I used to get it to work:
Regexp:
\(ERROR\|WARNING\|\*\* Error\|\*\* Warning\)[^:]*:\( *[[0-9]+]\)? \(.+\)(\([0-9]+\)):
File subexp index: 3
Line subexp index: 4
Vhdl Compile Use Local Error Regexp (under Vhdl Compile group): Off
And here's my story about it:
http://www.velocityreviews.com/forums/t957495-emacs-vhdl-mode-next-error-previous-error-and-first-error-are-not-working.html
:P
Hope this helps!