Scalastyle Linter扩展不适用于Sublime TextLinux

如何解决Scalastyle Linter扩展不适用于Sublime TextLinux

最近,我已经安装了Ubuntu 20.04,并且试图将Sublime Text 3.2.2设置为可与Scala一起使用。我已经安装了SublimeLinter软件包,并使用SublimeLinter注释测试了它是否可以正常工作。

然后我安装了SublimeLinter-contrib-scalastyle,并按照this guide进行了设置。

当我在命令行中运行scalastyle时,将获得预期的输出:

scalastyle 1.0.0
Usage: scalastyle [options] <source directory>
 -c,--config FILE               configuration file (required)
 -v,--verbose true|false        verbose output
 -q,--quiet true|false          be quiet
     --xmlOutput FILE            write checkstyle format output to this file
     --xmlEncoding STRING        encoding to use for the xml file
     --inputEncoding STRING      encoding for the source files
 -w,--warnings true|false       fail if there are warnings
 -e,--externalJar FILE          jar containing custom rules
 -x,--excludedFiles STRING      regular expressions to exclude file paths (delimited by semicolons)

我的崇高文字在页面底部显示以下内容:

SublimeLinter: ERROR:
=====================

scalastyle: Defining 'cls.syntax' has no effect anymore. Use http://www.sublimelinter.com/en/stable/linter_settings.html#selector instead.


SublimeLinter: ERROR:
=====================

scalastyle disabled. 'selector' is mandatory in 'cls.defaults'.
 See http://www.sublimelinter.com/en/stable/linter_settings.html#selector

但是,在我的配置中情况并非如此。 这是我的高级linter配置,其中删除了“语法”并添加了“选择器”:

{
    // Set to true to print extra information in the console.
    "debug": true,// When in the "background" lint mode,this value determines
    // the minimum delay before a request is send to the linter
    "delay": 0.1,// Available gutter themes:
    // - Blueberry Cross
    // - Blueberry Round
    // - Circle
    // - Danish Royalty
    // - Default
    // - Hands
    // - Knob
    // - Knob Symbol
    // - Koloria
    // - ProjectIcons
    // Note that you may need to change the "icon" property in "styles"
    // to an icon in the theme (they usually include "warning" and "error")
    "gutter_theme": "Default",// Demote the visibility of a class off errors while you're editing.
    // The errors will re-appear after `time_to_idle` and immediately on save.
    // - ws_only: erroneous regions that contain only whitespace
    // - some_ws: erroneous regions that contain *some* whitespace
    // - multilines: multiline errors
    // - warnings: errors of the "warning" type
    // - all: demote all the things
    // - none: disable this feature
    "highlights.demote_while_editing": "none",// Apply a color (via scope) to the demoted errors.
    // E.g. "" will hide the errors,"comment" is usually a subtle color.
    "highlights.demote_scope": "",// How long to wait before showing the demoted errors again.
    // Tip: A big value like 3600 will essentially hide the regions until
    // you save the buffer.
    "highlights.time_to_idle": 1.5,// Set to true to start the highlights hidden. Use the command
    // "SublimeLinter: Toggle Highlights" to toggle the highlights
    "highlights.start_hidden": false,// Send a "terminate" signal to old lint processes,if their result would
    // be thrown away. If false we fire-and-forget processes instead.
    "kill_old_processes": true,// Lint Mode determines when the linter is run.
    // - background: asynchronously on every change
    // - load_save: when a file is opened and every time it's saved
    // - manual: only when calling the Lint This View command
    // - save: only when a file is saved
    "lint_mode": "background",// Linter specific settings.
    // More info: http://www.sublimelinter.com/en/stable/linter_settings.html
    // Linter specific settings except for 'styles' can also be changed
    // in sublime-project settings.
    // What settings are available is documented in the readme of the
    // specific linter plugin.
    // Example:
    "linters": {
        // The name of the linter you installed
        "scalastyle": {
            // Disables the linter. The default here is 'not set'
            "disable": false,// Additional arguments for the command line. Either a string
            // or an array. If set to a string,we 'shlex.split' it*.
            // E.g. '--ignore D112' or ['--config','./.config/foo.ini']
            //
            // * Note: Use proper quoting around paths esp. on Windows!
            "args": [],// Path to the executable to be used. Either a string or an
            // array. E.g. ['nvm','exec','8.6','eslint']
            "executable": "scalastyle",// A modified runtime environment for the lint job. Settings here
            // override the default,inherited ENV.
            "env": {},// Exclude files that match the given pattern(s).
            "excludes": [],// Suppress errors that match the the given pattern(s).
            // Either a 'string' or an 'array'. Each input string is handled as
            // a case-insensitive regex pattern and matched against the
            // error_type,code,and message. If it matches,the error will be
            // thrown away.
            // E.g. ["warning: ","W3\d\d: ","missing <!DOCTYPE> declaration"]
            "filter_errors": [],// Lint mode determines when the linter is run. The linter setting
            // will take precedence over the global setting.
            "lint_mode": "manual",// Determines for which views this linter will run.
            "selector": "source.scala",// A list of additional style definition blocks.
            "styles": [
                {
                    // Instead of 'types' you can specify error 'codes' for
                    // a style definition block
                    "codes": [""]
                }
            ],// The current working dir the lint job will run in.
            "working_dir": "",// **Only valid for PythonLinter**
            // Specify which python to use. Either a number or full path
            // to a python binary. SL will then basically use 'python -m'
            // to run the linter.
            "python": 3,// **Only valid for NodeLinter**
            // If true,will *not* use a globally installed binary
            "disable_if_not_dependency": false
        }
    },// Determines what happens when a linter reports a problem without column.
    // By default,a mark is put in the gutter and the first character is highlighted.
    // If this setting is true,the entire line is also highlighted.
    "no_column_highlights_line": false,// Provide extra paths to be searched when locating system executables.
    "paths": {
        "linux": [],"osx": [],"windows": []
    },// Show a report for problems on a line by hovering over the gutter.
    "show_hover_line_report": true,// Show a report for problems on a region by hovering over it.
    "show_hover_region_report": true,// Highlight problems in the minimap.
    "show_marks_in_minimap": true,// Show the output panel on save if there are problems.
    // - window: check if the window has problems.
    // - view: only check the current file.
    // - never: disable this feature.
    "show_panel_on_save": "never",// DEPRECATED: Not in use! Remove the setting from your User settings
    // to avoid future warnings.
    "statusbar.counters_template": "",// Show the messages for problems at your cursor position.
    // - {message} will be replaced by the actual messages.
    // - {linter} will be replaced by the linter reporting the error.
    // - {type} will be replaced by either warning or error.
    // - {code} will be replaced by the error code.
    // Set to "" to display nothing
    "statusbar.messages_template": "{message}","statusbar.show_active_linters": true,// Global styles for all linters.
    // Note: Styles can also be specified per linter! See above.
    // Only for linter-styles,there is one more setting:
    // - codes:
    //   An array which can contain error codes provided by a linter.
    //   Only valid as linter style in the "linters" section
    //
    // The styles list form a stack evaluated top-down. We call each object
    // herein a style definition. A style definition must match a specific
    // linter error,either its code or its error type,to take any effect.
    //
    // The default styles cannot be overriden per se,you extend them
    // in your user settings. The defaults can be read as "All linter problems
    // are red,outline,dots,but warnings are yellow."
    "styles": [
        {
            // Used to determine the color. E.g. region.<colorish>,with one of
            // redish,orangish,yellowish,greenish,bluish,purplish,pinkish.
            "scope": "region.yellowish markup.warning.sublime_linter",// The error type this style definition will match for.
            // An array which can contain "warning" and/or "error".
            // If omitted will match both.
            "types": ["warning"]
        },{
            // Determines,for overlapping errors,which one is visualised.
            "priority": 1,// The icon displayed in the gutter area
            // - "circle","dot" or "bookmark"
            // - "none" to remove the icon
            // - A path to an icon file like
            //   "Packages/SublimeLinter/gutter-themes/Blueberry Cross/error.png"
            // - One provided by a gutter theme (e.g. "warning" or "error").
            //   In theme Default: warning,error,cog,x,//   and diamond,heart,pointer,square,star,triangle,which all
            //   also have an -outline variant.
            "icon": "dot",// The highlight style:
            // - "none"
            // - "fill","outline",// - "solid_underline","squiggly_underline","stippled_underline"
            // In ST < 4074 the underline styles are replaced with outlines when
            // there is whitespace in the problem region (ST issue #137).
            // In newer versions underlines are replaced with outlines when
            // there are newlines in the problem region for readability.
            "mark_style": "outline","scope": "region.redish markup.error.sublime_linter"
        }
    ],}

什么会导致Sublime Linter在scalastyle插件上失败?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-
参考1 参考2 解决方案 # 点击安装源 协议选择 http:// 路径填写 mirrors.aliyun.com/centos/8.3.2011/BaseOS/x86_64/os URL类型 软件库URL 其他路径 # 版本 7 mirrors.aliyun.com/centos/7/os/x86
报错1 [root@slave1 data_mocker]# kafka-console-consumer.sh --bootstrap-server slave1:9092 --topic topic_db [2023-12-19 18:31:12,770] WARN [Consumer clie
错误1 # 重写数据 hive (edu)&gt; insert overwrite table dwd_trade_cart_add_inc &gt; select data.id, &gt; data.user_id, &gt; data.course_id, &gt; date_format(
错误1 hive (edu)&gt; insert into huanhuan values(1,&#39;haoge&#39;); Query ID = root_20240110071417_fe1517ad-3607-41f4-bdcf-d00b98ac443e Total jobs = 1
报错1:执行到如下就不执行了,没有显示Successfully registered new MBean. [root@slave1 bin]# /usr/local/software/flume-1.9.0/bin/flume-ng agent -n a1 -c /usr/local/softwa
虚拟及没有启动任何服务器查看jps会显示jps,如果没有显示任何东西 [root@slave2 ~]# jps 9647 Jps 解决方案 # 进入/tmp查看 [root@slave1 dfs]# cd /tmp [root@slave1 tmp]# ll 总用量 48 drwxr-xr-x. 2
报错1 hive&gt; show databases; OK Failed with exception java.io.IOException:java.lang.RuntimeException: Error in configuring object Time taken: 0.474 se
报错1 [root@localhost ~]# vim -bash: vim: 未找到命令 安装vim yum -y install vim* # 查看是否安装成功 [root@hadoop01 hadoop]# rpm -qa |grep vim vim-X11-7.4.629-8.el7_9.x
修改hadoop配置 vi /usr/local/software/hadoop-2.9.2/etc/hadoop/yarn-site.xml # 添加如下 &lt;configuration&gt; &lt;property&gt; &lt;name&gt;yarn.nodemanager.res