psalm.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?xml version="1.0"?>
  2. <psalm
  3. errorLevel="4"
  4. resolveFromConfigFile="true"
  5. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  6. xmlns="https://getpsalm.org/schema/config"
  7. xsi:schemaLocation="https://getpsalm.org/schema/config"
  8. errorBaseline="build/psalm-baseline.xml"
  9. >
  10. <projectFiles>
  11. <directory name="apps"/>
  12. <directory name="core"/>
  13. <directory name="lib"/>
  14. <directory name="ocm-provider"/>
  15. <directory name="ocs"/>
  16. <directory name="ocs-provider"/>
  17. <file name="index.php"/>
  18. <file name="public.php"/>
  19. <file name="remote.php"/>
  20. <file name="status.php"/>
  21. <file name="version.php"/>
  22. <ignoreFiles>
  23. <directory name="apps/**/composer"/>
  24. <directory name="apps/**/tests"/>
  25. <directory name="apps/files_external/3rdparty"/>
  26. <directory name="lib/composer"/>
  27. <directory name="lib/l10n"/>
  28. </ignoreFiles>
  29. </projectFiles>
  30. <extraFiles>
  31. <directory name="3rdparty"/>
  32. <directory name="apps/files_external/3rdparty"/>
  33. </extraFiles>
  34. <stubs>
  35. <file name="build/stubs/apcu.php"/>
  36. <file name="build/stubs/gd.php"/>
  37. <file name="build/stubs/imagick.php"/>
  38. <file name="build/stubs/intl.php"/>
  39. <file name="build/stubs/IntlChar.php"/>
  40. <file name="build/stubs/ldap.php"/>
  41. <file name="build/stubs/memcached.php"/>
  42. <file name="build/stubs/redis.php"/>
  43. <file name="build/stubs/redis_cluster.php"/>
  44. <file name="build/stubs/sftp.php"/>
  45. <file name="build/stubs/ssh2.php"/>
  46. <file name="build/stubs/xsl.php"/>
  47. </stubs>
  48. <issueHandlers>
  49. <UndefinedFunction>
  50. <errorLevel type="suppress">
  51. <!-- template functions: https://github.com/nextcloud/server/blob/6e8e34fef920a073118c22111f0f31eb3b3a91dc/lib/private/legacy/template/functions.php -->
  52. <referencedFunction name="p"/>
  53. <referencedFunction name="emit_css_tag"/>
  54. <referencedFunction name="emit_css_loading_tags"/>
  55. <referencedFunction name="emit_script_tag"/>
  56. <referencedFunction name="emit_script_loading_tags"/>
  57. <referencedFunction name="print_unescaped"/>
  58. <referencedFunction name="script"/>
  59. <referencedFunction name="vendor_script"/>
  60. <referencedFunction name="style"/>
  61. <referencedFunction name="vendor_style"/>
  62. <referencedFunction name="translation"/>
  63. <referencedFunction name="component"/>
  64. <referencedFunction name="link_to"/>
  65. <referencedFunction name="link_to_docs"/>
  66. <referencedFunction name="image_path"/>
  67. <referencedFunction name="mimetype_icon"/>
  68. <referencedFunction name="preview_icon"/>
  69. <referencedFunction name="publicPreview_icon"/>
  70. <referencedFunction name="human_file_size"/>
  71. <referencedFunction name="strip_time"/>
  72. <referencedFunction name="relative_modified_date"/>
  73. <referencedFunction name="html_select_options"/>
  74. </errorLevel>
  75. </UndefinedFunction>
  76. <UndefinedGlobalVariable>
  77. <errorLevel type="suppress">
  78. <referencedVariable name="$_"/>
  79. <referencedVariable name="$l"/>
  80. <referencedVariable name="$theme"/>
  81. <!-- false positive: https://github.com/nextcloud/server/blob/cb057829f72c70e819f456edfadbb29d72dba832/lib/private/Console/Application.php#L92 -->
  82. <file name="apps/*/appinfo/register_command.php" />
  83. <file name="core/register_command.php" />
  84. </errorLevel>
  85. </UndefinedGlobalVariable>
  86. </issueHandlers>
  87. </psalm>