【发布时间】:2017-07-16 03:29:24
【问题描述】:
我在我的机器中安装了cppcheck,在我的SublimeText3 中安装了Sublimelinter 和cppcheck 插件,如文档所述,但我仍然无法使cppcheck 正常工作。我想我在路径变量中犯了一些错误。我阅读了this 的答案,但无法理解。请帮我配置它。谢谢。
这是我的机器 (Ubuntu 16.04) 对相关命令的输出:
which cppcheck
/usr/bin/cppcheck
我的~/.profile 文件:
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH:/usr/bin"
这是我的 Sublimelinter.sublime-settings 文件:
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "manual",
"linters": {
"cppcheck": {
"@disable": false,
"args": [],
"enable": "style",
"excludes": [],
"std": ["c++11"]
}
},
"mark_style": "outline",
"no_column_highlights_line": false,
"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",
"javascript (babel)": "javascript",
"magicpython": "python",
"php": "html",
"python django": "python",
"pythonimproved": "python"
},
"warning_color": "DDB700",
"wrap_find": true
}
}
还要注意,每当我尝试在上面添加 /usr/bin/ 时,即
"paths" : {"linux" : [/usr/bin/]}Sublime 都会显示错误。请在这里帮助我。
【问题讨论】:
标签: sublimetext3 ubuntu-16.04 cppcheck sublimelinter