我正在尝试声纳,我在一个 php 项目中遇到了一些问题。
我必须做多模块才能至少获得 php 和 js 分析。
这是我的声纳项目.properties:
sonar.projectKey=xxxx sonar.projectName=xxxx sonar.projectVersion=1.0
sonar.sourceEncoding=UTF-8
sonar.sources=
sonar.language=php
sonar.exclusions=htdocs/libraries/externals/**
sonar.phpCodesniffer.skip=true
sonar.modules=php-module,js-module
# PHP module
php-module.sonar.projectName=PHP Module
php-module.sonar.language=php
php-module.sonar.sources=
php-module.sonar.projectBaseDir=htdocs
php-module.sonar.exclusions=libraries/externals/**
# JavaScript module
js-module.sonar.projectName=JavaScript Module
js-module.sonar.language=js
js-module.sonar.sources=js
js-module.sonar.projectBaseDir=htdocs
但是当我运行 sonar-runner 时,我得到了这个错误:
Exception in thread "main" org.sonar.runner.RunnerException: org.sonar.api.utils.SonarException: PHPMD execution failed with returned code '1'. Please check the documentation of PHPMD to know more about this failure
PHPMD 错误是
The parser has reached an invalid state near line "32" in file "/var/www/vhosts/dev3.xxxx.local/htdocs/libraries/externals/AvaTax4PHP/classes/ATConfig.class.php". Please check the following conditions: The keyword "parent" was used as type hint but the class "ATConfig" does not declare a parent.
但是,如果我排除了项目和模块中的目录库,为什么会发生这种情况?
我是否必须向 PHPMD 指定另一个排除列表?