php - How do you use Scrutinizer's dependency_paths config setting to hide issues in certain folders? -
i'm using scrutinizer-ci's static analysis functions provide feedback on php code. per their documentation, have .scrutinizer.yml
file in root of project seems configuring scrutinizer's options way want them be. almost.
one of options dependency_paths
, allows me specify path contains dependency. according communicated @ scrutinizer...
"the paths listed in dependencies different entirely excluded paths in @ them find classes or functions define make analysis of other files more accurate. not issues in these files."
unfortunately, doesn't seem working me. i'm using saml authentication, , therefore have simplesamlphp
folder in source code. (you can't include simplesamlphp via composer because have edit of config files , such based on how you're using it).
the relevant part of .scrutinizer.yml
file looks this:
filter: paths: - application/* tools: php_analyzer: dependency_paths: - application/simplesamlphp/*
(the application
folder root level folder in source code).
this does seem prevent issues found in simplesamlphp
folder affecting code's score in scrutinizer. however, scrutinizer still reporting thousands of issues code found in simplesamlphp
folder, making hard find issues code wrote.
am using dependency_paths
setting wrong? sure seems isn't working way told would... leaving me rather confused.
edit: give little more information, able exclude simplesamlephp
folder using excluded_paths
option. challenge let scrutinizer @ classes , such in dependencies (in order better understand my code) not report issues found in dependencies.
edit 2: well, interesting. experimented several versions of (the relevant parts of) .scrutinizer.yml
file , saw following results.
first, had told scrutinizer exclude simplesamlphp
folder:
filter: paths: - application/* excluded_paths: - application/simplesamlphp/* tools: php_analyzer: dependency_paths: - application/simplesamlphp/*
that enabled me see issues own code , fix them. @ point, project's score on scrutinizer 9.54. stopped excluding simplesamlphp
:
filter: paths: - application/* tools: php_analyzer: dependency_paths: - application/simplesamlphp/*
this change introduced 7756 issues in scrutinizer's analysis, left project's score @ 9.54 (meaning issues in simplesamlphp
being reported, not counted against me). tried removing trailing slash , asterisk path:
filter: paths: - application/* tools: php_analyzer: dependency_paths: - application/simplesamlphp
this change introduced 2002 issues , fixed 3198 issues, of them (both introduced , fixed) being in simplesamlphp
folder. hadn't expected kind of effect @ all. lowered project's score on scrutinizer down 7.47, meaning issues in simplesamlphp
folder being counted against me. tried changing single-line array syntax dependency_paths
:
filter: paths: - application/* tools: php_analyzer: dependency_paths: [application/simplesamlphp]
this had no effect. sake of thoroughness added trailing /*
array syntax:
filter: paths: - application/* tools: php_analyzer: dependency_paths: [application/simplesamlphp/*]
these results surprised me. change fixed 2002 issues , brought score 9.54. both fixed issues , remaining 4519 issues in simplesamlphp
folder. while seems me closer goal, still leaves thousands of issues code in dependency_paths. i'm not sure else try @ point, i'll go excluding simplesamlphp
folder completely.
Comments
Post a Comment