PhpStorm Ignore files/directories in TODO feature

后端 未结 4 1472
梦毁少年i
梦毁少年i 2021-01-07 16:21

Is it possible to exclude certain files from the TODO function in PhpStorm? For example, I\'m using the highcharts javascript library. I don\'t want to see the few dozen or

相关标签:
4条回答
  • Yes, you can -- via custom scope that would include all but unwanted files/folders (Settings | Scopes) and then just choose it in TODO window.

    Check these articles for details:

    • http://blog.jetbrains.com/webide/2012/10/managing-todo/
    • http://confluence.jetbrains.com/display/PhpStorm/Working+with+todo+comments+and+the+todo+tool+window

    P.S.
    This functionality is available since v6 only.

    0 讨论(0)
  • 2021-01-07 16:47

    To exclude code (usually composer dependencies) from analysis.

    • Right click on desired folder
    • Click 'Mark Directory As'
    • Click 'Excluded'

    Screenshot example below: enter image description here

    0 讨论(0)
  • 2021-01-07 17:04

    For libraries, there is a one click solution as I have just found out.

    You can use the "External Libraries" feature to include the specific library folder, after which PHPStorm / IDEA will mark the folder as a library home and exclude it from inspection.

    Note that you can include folders inside your project directroy, even though it's called "External" Libraries.

    enter image description here

    0 讨论(0)
  • 2021-01-07 17:05
    1. In File > Settings > Scope add a new scope and make sure the files you like are green.
    2. Open TODO Tab View > Tool Windows > TODO (Alt + 6)
    3. In the top of TODOs click on Scope Based
    4. Below select your new scope from step 1 below Custom Local Scopes

    enter image description here

    0 讨论(0)
提交回复
热议问题