SublimeLinter "max-line-length" setting not applied - sublimetext3

I'm having difficulty setting user settings for SublimeLinter in SublimeText3. I've checked here: http://www.sublimelinter.com/en/latest/settings.html
I've tried setting my user settings, and setting "max-line-length" to 80 (the default is 100):
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"pylint": {
"#disable": false,
"args": [],
"disable": "",
"enable": "",
"excludes": [],
"max-line-length": 80,
"paths": [],
"rcfile": "",
"show-codes": false
}
},
"mark_style": "outline",
"no_column_highlights_line": true,
"passive_warnings": false,
"paths": {
"linux": [],
"osx": [],
"windows": []
},
"python_paths": {
"linux": [],
"osx": [],
"windows": []
},
"rc_search_limit": 3,
"shell_timeout": 10,
"show_errors_on_save": false,
"show_marks_in_minimap": true,
"syntax_map": {
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"php": "html",
"python django": "python"
},
"warning_color": "DDB700",
"wrap_find": true
}
}
However, this setting is not applied. I have closed and re-opened sublime text. How do I get this setting to be applied? Thanks.

The syntax you are using seems to work for some linters, however, as far as I know it doesn't works for pylint.
Anyway, for using pylint from Sublime Text you can use the command argument --max-line-length=N,
so change
"args": []
for
"args": ["--max-line-length=90"]
In addition, if you do this, remove the max-line-length property.
Edit: where to place SublimeLinter settings.
You can learn about it in the SublimeLinter settings documentation
I used the user-settings-file, that you can usually find using the following menu option: Preferences > Package Settings > SublimeLinter > Settings-User. For this purpose you need to add the option inside linters/pylint:
{
"user": {
"linters": {
"pylint": {
// "exampleOtion": "exampleValue",
"args": ["--max-line-length=90"]
}
}
}
}
Please note that probably your config file is similar to the one in the question, so you just need to add the new option inside "pylint" without breaking the JSON format

As this message continues to appear regularly on the first page of Google and SublimeLinter has changed a lot, here is my solution:
I enter "pref lint" or "preferences linter" in the Command Palette in sublime text 3 (screenshot) to open the preferences file.
Here's the SublimeLinter.sublime-settings default config file I am using (W0312 is for using tabs instead of spaces):
// SublimeLinter Settings - User
{
"linters": {
"pylint": {
"filter_errors": ["warning:", "W0312"]
}
}
}
I use pylint-messages to find the right error/warning codes, with the help of the search box.

Related

v8 no local variables in debugger

I compiled v8 on Linux Min 20.2 using VsCode.
My build tasks.json task looks like this
"tasks": [
{
"label": "gm x64.debug all",
"type": "shell",
"command": "tools/dev/gm.py x64.debug all",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "dedicated",
"clear": true
},
"problemMatcher": {
"fileLocation": [
"relative",
"${workspaceFolder}out/x64.debug/"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
launch.json config
{
"name": "(gdb) launch hello_world",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/out/x64.debug/v8_hello_world",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
Breakpoints working well also callstack is available but there is no local variables.
I use extension "C/C++ (by Microsoft)".
How I can enable them?
(V8 developer here.)
Inspecting local variables should work by default. You could try running the compiled binary in GDB to see if something is missing from the binaries, or it's an issue with VSCode's integrated debugger or its configuration.
One thing to keep in mind is that tools/dev/gm.py will not overwrite existing build settings. If you e.g. manually put symbol_level = 1 or v8_optimized_debug = true (two examples for settings that will break your debugging experience) into out/x64.debug/args.gn, then gm.py will maintain these settings, assuming that you put them there on purpose. To get back to the defaults, you can rm -rf out/x64.debug. You can also look up the default settings in gm.py's source.

SublimeText - CSSLint ignore alphabetical order

I'm using Sublime Text 3 and SublimeLinter CSSLint.
How can I disable the order-alphabetical warnings?
I've found this link:
https://github.com/SublimeLinter/SublimeLinter-csslint/issues/15
Preferences > Package Settings > SublimeLinter > Settings.
I get this window:
Then what?
Someone suggested the following code:
"linters": {
"csslint": {
"#disable": false,
"args": [],
"errors": "",
"excludes": [],
"ignore": ["order-alphabetical"],
"warnings": ""
},
I've tried copying and pasting into the right hand pane (// SublimeLinter Settings - User) but I get an error message:
What am I doing wrong? Should I paste this into the left pane/window? Do I delete the text "// SublimeLinter Settings - User"?
Thank you
While Sublime Text allows comments in its JSON-like settings format, you need to make sure the rest of notation is valid. Hence, your settings should look something like this:
{
"linters": {
"csslint": {
"#disable": false,
"args": [],
"errors": "",
"excludes": [],
"ignore": ["order-alphabetical"],
"warnings": ""
}
}
}

Is there a way to use another extension instead of .feature?

I use some files written with Gherkin mode, but they don't have the ".feature" extension. I tried to change some visual code files related to cucumber extension to be able to highlight files that are not .feature but I had no success.
For example:
Workspace settings.json:
{
"folders": [
{
"path": "/home/user/git"
},
{
"path": "/home/user/Documents/scripts"
}
],
"settings": {}
"cucumberautocomplete.steps": [
"*.myext"
],
"cucumberautocomplete.syncfeatures": "*.myext",
"cucumberautocomplete.strictGherkinCompletion": true
}
It worked changing the file /home/user/.config/Code/User/settings.json and adding this config:
"files.associations": {
"*.myext": "feature"
}
{
"editor.renderWhitespace": "all",
"window.titleBarStyle": "custom",
"editor.fontSize": 15,
"python.jediEnabled": false,
"terminal.integrated.shell.linux": "/bin/bash",
"workbench.colorTheme": "Visual Studio Dark",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"[feature]": {
},
"files.associations": {
"*.myext": "feature"
}
}

Sublime Text 3 delete my php code when I save it

<?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class AdminHomeController extends Controller
{
public function index()
{
return view('AdminHome')->withPages(Page::all());
}
}
when i press ctrL+s to save it ,then some code is deleted . I don't know why ,can you give me a solution ?
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
class AdminHomeController extends Controller {
public function index() {
return view('AdminHome')->withPages(Page::all());
}
}
the code become like this .
I installed packages for my sublime text 3 ,in the follow picture . I think it's caused by sublimeLinter , but I don't kow how to fix it , my user settings as follows:
enter image description here
{
"user": {
"debug": false,
"delay": 0.15,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "load/save",
"linters": {
"php": {
"#disable": false,
"args": [],
"excludes": []
},
"phplint": {
"#disable": false,
"args": [],
"excludes": []
}
},
"mark_style": "outline",
"no_column_highlights_line": false,
"passive_warnings": false,
"paths": {
"linux": [],
"osx": [],
"windows": [
"D:\\wamp64\\bin\\php\\php7.0.4"
]
},
"python_paths": {
"linux": [],
"osx": [],
"windows": []
},
"rc_search_limit": 3,
"shell_timeout": 10,
"show_errors_on_save": false,
"show_marks_in_minimap": true,
"syntax_map": {
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"javascript (babel)": "javascript",
"magicpython": "python",
"php": "html",
"python django": "python",
"pythonimproved": "python"
},
"warning_color": "DDB700",
"wrap_find": true
}
}
This is the first time I ask question on this website ,and I am from China , my English is not very good .
your issue is reported before from phpfmt users. under package settings-> phpfmt -> setting - User then add "passes": ["OnlyOrderUseClauses"]. have a look on this issue
update: the working format is "passes": "OnlyOrderUseClauses", as #SHUIPING_YANG mentioned
I had the same issue, but couldn't figure out exactly why Sublime always deleting my PHP use statements; Moreover, while trying to troubleshoot the issue, I realized that my Sublime packages differed from the ones you had installed. Expect for one, that was SublimeCodeIntel. I removed it, and upon pressing Ctrl + S, Sublime no longer removed the use statements.

ST3 SublimeLinter with HTML tidy doesn't obey args

I want to suppress various kind of useless linter error reports, e.g. lacks "content" attribute. So I tried experimenting with setting the options in SublimeLinter.sublime-settings:
"linters": {
"htmltidy": {
"#disable": false,
"args": [-xxx true],
"excludes": []
}
},
and so on and they don't seem to do anything. Am I doing something wrong?
The settings file is a JSON file, and it looks like your edits are not valid JSON. Try putting quotes around the args, either:
"args": ["-xxx true"]
or
"args": ["-xxx", "true"]
This worked for me:
"linters": {
"htmltidy": {
"#disable": false,
"args": [
//http://tidy.sourceforge.net/docs/quickref.html
"--drop-proprietary-attributes", "false"
],
"excludes": []
}...

Resources