The code linting framework for Sublime Text
MIT License
Bot releases are visible (Hide)
--- @WZ-Tong implemented the setting show_panel_on_save.ignored_error_types
to suppress the automatic panel popup for certain error types.
You could set it to ["info", "hint"]
for example.
That's it, sincerely,
π
Published by kaste 6 months ago
Published by kaste 6 months ago
Reloading always threw a RuntimeError
. That doesn't have to be so. (#1937)
Published by kaste 6 months ago
The current stable version of Sublime Text, build 4169, has a bug requiring a
restart after a fresh and clean install of SublimeLinter.
This release just adds an installation note about that.
Published by kaste 6 months ago
That's it: we say Goodbye to Sublime Text 3 and run on the Python 3.8 host.
You may want to restart.
How is this implemented? On Sublime's startup and when you install/remove
packages using Package Control we automatically lift all SL adapters/addons
to the 3.8 host. This is necessary as it is impossible to get cooperation
in a single step and limited timeline for 100+ repos. Over time these helper
packages may eventually update and Sublime Linter will remove the "lifts".
During that period it may or may not be necessary to restart Sublime Text
after upgrades of such plugins. This is currently unknown as I (and we) don't
have much experience in these processes. This is a novel approach after all.
That being said, on my machine installing and uninstalling is seamless and
just worksβ’οΈ.
Sincerely,
π
Yes, I do enjoy coffee: https://paypal.me/herrkaste
Published by kaste 7 months ago
I ridiculously screwed the 4.35.4 tag. (That was not installable π¬.) So we ship a new one.
Published by kaste 7 months ago
Prepare for the python 3.8 plugin host.
Published by kaste 8 months ago
Popen._communicate
from recent python versionsPublished by kaste 9 months ago
Fix 4.23.1 which pointed to the wrong commit. π€·
Published by kaste 9 months ago
Maintenance release with no intended behavioral changes.
Published by kaste about 1 year ago
Summer maintenance, updated documentation and a very tiny addition from @harrymander (#1917).
Without that addition it would have been a patch release but so it's a "minor". π
Published by kaste over 1 year ago
--- @mataha improved our Yarn support drastically (#1899).
--- There is a new setting "highlights.start_hidden": ["phantoms"],
.
(I actually promised this for 4.20.0 but it wasn't there yet.)
Use this to hide possible drawn inline phantoms initially, and then toggle
them when needed. Really like you might do with the error panel, but then
with the error details inlined.
You might try a key-binding for fast toggling:
```
{ "keys": ["ctrl+k", "ctrl+k"],
"command": "sublime_linter_toggle_highlights",
"args": {"what": ["phantoms"]}
},
```
--- Implement disable_if_not_dependency
for Python based linters, useful
if you don't want to use globally installed binaries.
Sincerely,
π
Yes, I do drink coffee: https://paypal.me/herrkaste
Published by kaste over 1 year ago
For the default experience, t.i. you did not set executable
or working_dir
etc. I improved
how we find a possible virtual environment. We also try to find a project root and set the
working_dir
to that now. (Generally we go from the file currently open upwards the directory
hierarchy whereby before we always just used one of the open folders from the Sublime
sidebar.)
Note that we detect virtual environments from "poetry" and "Pipenv" if we find some marker
files (usual their .lock
files) in your project. I actually prefer local folders, and we detect them
when they're named "venv", ".env", or ".venv".
Finally, if you set python
to a specific version and are on Windows, we now just use your py.exe
(which is typically installed on Windows and placed on PATH) to find the correct python.
For the benefit that not all the various python versions have to be visible on the PATH.
And yes, I do drink coffee: https://paypal.me/herrkaste
β€οΈ
Published by kaste over 1 year ago
Published by kaste almost 2 years ago
@jareha fixed some typos in our settings file (#1884) and I fixed a small formatting issue in our logging (#1887).
Published by kaste about 2 years ago
Finally, I mean: f i n a l l y, we have annotation and inline phantoms[*].
-- By default, nothing changes, you have to opt-in.
Here's how it goes as it is a bit tricky and also sophisticated:
++ Everything is configured within the styles
section in the global
SublimeLinter settings. For that to work, the style definitions accept two
new keys, namely annotation
and phantom
.
These are template strings, therefore e.g. "{code}"
, "{msg}"
, "{linter}"
are typical values used here.
Use ""
(the default) to turn this feature off.
Because this is implemented as "style" of an error, you can adjust and
fine-tune the feature for each linter separately. (°°)
This is extremely important to reduce clutter and noise where possible.
Because, believe me, this can lead to clutter and noise.
For example, while writing, you often produce intermittent syntax errors.
But that is natural for writing and shouldn't produce too much visual
distraction. You can for example define
"mypy": {
"styles": [
{
"codes": ["syntax"], # mypy's rule/code for syntax errors
"icon": "cog",
"phantom": "", # no inline phantoms
"annotation": "π£", # an icon on the right side
},
{
"phantom": "{msg}", # for all other reported problems
}
],
},
to mitigate this effect.
E.g. for "annotations", everything is already pretty much in the code. You
could try:
"annotations": {
"styles": [
{
"types": ["error"],
"scope": "region.redish",
"annotation": "!"
},
{
"annotation": "",
"phantom": ""
},
]
},
Especially phantoms are both annoying and the best thing since sliced bread.
So we only show them for "errors" (not for "warnings" etc) as long as there
are any errors and only then also for warnings and other types. Yeah, that
should probably be pluggable but then I would never release anything.
To quickly toggle the phantoms you can use our sublime_linter_toggle_highlights
command. By default it toggles both the squiggles and the inline phantoms but: --
{ "keys": ["ctrl+k", "ctrl+k"],
"command": "sublime_linter_toggle_highlights",
"args": {"what": ["phantoms"]} // or "squiggles"
},
-- this is already pluggable.
Sincerely,
β€οΈ
And yes, I do drink coffee: https://paypal.me/herrkaste
[*] Annotations are small text fields on the right hand side of the view at
the same line of an error. Because of that they usually have not much
space to show anything.
Phantoms appear right below the error and use the full width of the view.
They make clear what an error is about, have lots of space but - if you
have lots of them in a small section - the actual code might get too
interspersed.
Published by kaste about 2 years ago
Howdy,
--- we slightly refreshed the panel design.
--- we auto detect more python environments. Typical local installation on
".env" or ".venv" (where Kenneth' put these) and poetry
are supported.
--- in the styles settings, code
is now a prefix match. For example:
{
"codes": ["E3", "E2"],
"scope": "comment",
},
will match against rules "E302", "E304", ...
Handy for all linters that organize the rules like hierarchical
namespaces, like e.g. rubocop and eslint. (E.g. "prettier/")
--- there is now a global on/off switch. This is useful for example for
plugins with special views. For example, GitSavvy now lints the commit
message views which was not possible before as these scratch, temporary,
widget-like views were always skipped.
But you can also turn SublimeLinter off on a per project basis.
{
"folders": [{ "path": "." }],
"settings": {
"SublimeLinter.enabled?": false,
}
}
--- and a spelling fixer for the codespell linter
+++ the usual maintenance commits
https://github.com/SublimeLinter/SublimeLinter/compare/4.18.0...4.19.0 π
Published by kaste almost 3 years ago
shellcheck
(#1828)https://github.com/SublimeLinter/SublimeLinter/compare/4.17.0...4.18.0
Published by kaste over 3 years ago
Mostly shipping maintenance, we have two notable changes for plugins:
Beside the obvious line
and col
you can now capture end_line
and
end_col
in the regexes. The low level LintMatch
usually used with JSON
formats also understands these keys of course.
If a plugin wants to log something, no need to import logging; ...
anymore,
as there is a configured self.logger
now.
As a reminder:
self.logger.info("message")
only emits in debug modeself.logger.warning("message")
always emits to Sublime's builtin consoleself.logger.error("message")
popups a panel (usually don't!)https://github.com/SublimeLinter/SublimeLinter/compare/4.16.3...4.17.0
Published by kaste over 3 years ago
Minor fixes