Repository navigation
Expand file tree
/
Copy pathphpstan.neon
More file actions
65 lines (64 loc) · 2.32 KB
/
Copy pathphpstan.neon
File metadata and controls
65 lines (64 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# SPDX-FileCopyrightText: 2026 Thomas Vincent <thomasvincent@gmail.com>
# SPDX-License-Identifier: GPL-2.0-or-later
#
# This file is part of plugin_gpu, a plugin for Cacti.
# https://github.com/somethingwithproof/plugin_gpu
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
# Static analysis of the plugin classes against a Cacti core checkout.
# CACTI_PATH=/path/to/cacti phpstan analyse -c phpstan.neon
# Core is scanned for symbols only.
parameters:
level: 9
phpVersion: 80200
paths:
- lib
- setup.php
- include/operator.php
- include/unbooted-uninstall.php
- gpu_nodes.php
- gpu_operator.php
- gpu_health.php
- gpu_inventory.php
- poller_gpu.php
- ss_gpu.php
scanDirectories:
- %env.CACTI_PATH%/lib
- %env.CACTI_PATH%/include
bootstrapFiles:
- tests/phpstan-bootstrap.php
excludePaths:
analyseAndScan:
- %env.CACTI_PATH%/include/vendor/*
- %env.CACTI_PATH%/include/fa/*
- %env.CACTI_PATH%/include/js/*
- %env.CACTI_PATH%/include/themes/*
treatPhpDocTypesAsCertain: false
ignoreErrors:
# Cacti pages and CLI scripts chdir() to the Cacti root before
# including core files, so the relative paths resolve only at runtime.
-
identifiers: [include.fileNotFound, includeOnce.fileNotFound]
paths: [gpu_*.php]
-
identifier: requireOnce.fileNotFound
path: gpu_operator.php
-
identifier: require.fileNotFound
path: poller_gpu.php
# $config comes from core's cli_check.php.
-
identifier: variable.undefined
path: poller_gpu.php
# csrf-magic is in include/vendor, which is not scanned.
-
message: '#^Function csrf_check not found\.$#'
path: gpu_operator.php