简体   繁体   English

PhpStorm 仅显示检查错误

[英]PhpStorm only show Errors from Inspections

In PhpStorm how can I only show Errors, not Warnings globally for all files etc.?在 PhpStorm 中,我如何只显示错误,而不是全局显示所有文件等的警告?

I only can find the Inspection area in Preferences, but there I would have to uncheck all warnings, minor warnings for all Checkboxes and had to manage this for new file types in the future.我只能在“首选项”中找到“检查”区域,但我必须取消选中所有警告、所有复选框的次要警告,并且将来必须为新文件类型管理它。

So, how can I Globally only show errors like it was possible in the past with Inspection Levels?那么,我如何才能在全球范围内只显示过去检查级别可能出现的错误?

That can't be done in one click, but there's still a way.这不能一键完成,但仍有办法。 Open your inspections ( File | Settings | Editor | Inspections ), create a new inspections profile, eg "Errors only".打开您的检查(文件|设置|编辑|检查),创建一个新的检查配置文件,例如“仅错误”。 Use filtering options to select all the inspection types but "Errors":使用过滤选项对 select 除了“错误”之外的所有检查类型:

检查

Then click on a top inspection name/group and then shift + click on a bottom one to select all of them:然后单击顶部检查名称/组,然后shift +单击底部的 select 所有这些名称/组:

选定的检查

Then press Space 2 times to remove all checkboxes.然后按 Space 2 次以删除所有复选框。 Save the profile.保存配置文件。 Voilà.瞧。 You now have a "Errors only" profile that you can use for this project when needed.您现在有一个“仅错误”配置文件,可在需要时用于此项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM