|
1 |
| -engines: |
2 |
| - duplication: |
3 |
| - enabled: true |
| 1 | +version: "2" |
| 2 | +plugins: |
| 3 | + # Disabling plugins until there is a reasonable way to sanitize their output |
| 4 | + phpcodesniffer: |
| 5 | + enabled: false |
4 | 6 | config:
|
5 |
| - languages: |
6 |
| - php: |
7 |
| - mass_threshold: 50 |
8 |
| - fixme: |
9 |
| - enabled: true |
| 7 | + standard: "PSR1,PSR2" |
| 8 | + ignore_warnings: true |
| 9 | + encoding: utf-8 |
10 | 10 | phpmd:
|
11 |
| - enabled: true |
12 |
| - exclude_fingerprints: |
13 |
| - - 908ad3f93985ff14c44615cee6966c72 # View have a lot of public methods. Deal with it. |
14 |
| - - 81ca5382dedb709060ec70ffea74e157 # allow exit in a call-back inside app constructor |
15 |
| - - 409aa7b6ded69296360c17d5c267c8dc # Grid::renderView iterates method |
16 |
| - - a4801fad2cfbf1b485de61cca855955d # Grid calls View::renderView() bypassing Lister. |
17 |
| - - 5030329ed016f46a2791c854caacb39c # Grid::getHTMLTags passes $row / $field, but $row is not used by money column |
18 |
| - - 113c8195220e554776225802db7021d6 # Persistence_Faker: Allow static access to class Faker\Factory in __construct |
19 |
| - checks: |
20 |
| - CleanCode/ElseExpression: |
21 |
| - enabled: false # gives many incorrect suggestions |
22 |
| - Controversial/CamelCaseClassName: |
23 |
| - enabled: false # because jQuery.php and similar class names |
24 |
| - Controversial/CamelCaseMethodName: |
25 |
| - enabled: false # methods start with _xx for private methods (that must remain public) |
26 |
| - Controversial/CamelCaseParameterName: |
27 |
| - enabled: false # allow parameter names to not use camelCase notation |
28 |
| - Controversial/CamelCasePropertyName: |
29 |
| - enabled: false # becasue we use _xx for private properties (that must remain public) |
30 |
| - Controversial/CamelCaseVariableName: |
31 |
| - enabled: false # because we call variables $f_login, $m_user for better readability. |
32 |
| - Controversial/Superglobals: |
33 |
| - enabled: false # yes we use superglobals and that's OK |
34 |
| - CyclomaticComplexity: |
35 |
| - enabled: false # our code is complex so that your code wouldn't be! |
36 |
| - CleanCode/BooleanArgumentFlag: |
37 |
| - enabled: false # sometimes it is meaningful to pass boolean arguments to methods |
38 |
| - Design/CouplingBetweenObjects: |
39 |
| - enabled: false # because we always allow to inject overrides! |
40 |
| - Design/LongMethod: |
41 |
| - enabled: false # our code is long so that your code wouldn't be! |
42 |
| - Design/NpathComplexity: |
43 |
| - enabled: false # our code is complex so that your code wouldn't be! |
44 |
| - Design/TooManyMethods: |
45 |
| - enabled: false # methods never should be to many |
46 |
| - Design/TooManyPublicMethods: |
47 |
| - enabled: false # it is OK that some classes have more than 12 public methods |
48 |
| - Design/WeightedMethodCount: |
49 |
| - enabled: false # because we solve complex task, our classes may be complex |
50 |
| - Naming/ShortMethodName: |
51 |
| - enabled: false # because of on() and js() and $ui |
52 |
| - Naming/ShortVariable: |
53 |
| - enabled: false # because of on() and js() and $ui |
54 |
| - # THERE IS MUCH TO MUCH OF THESE ERRORS - TEMPORARILY DISABLE THIS CHECK |
55 |
| - UnusedFormalParameter: |
56 |
| - enabled: false |
57 |
| - radon: |
58 |
| - enabled: true |
59 |
| -ratings: |
60 |
| - paths: |
61 |
| - - "src/**" |
62 |
| -exclude_paths: |
63 |
| -- "docs/**" |
64 |
| -- "tests/**" |
65 |
| -- "vendor/**" |
| 11 | + enabled: false |
| 12 | + sonar-php: |
| 13 | + enabled: false |
| 14 | + |
| 15 | +checks: |
| 16 | + argument-count: |
| 17 | + config: |
| 18 | + threshold: 5 |
| 19 | + complex-logic: |
| 20 | + config: |
| 21 | + threshold: 4 |
| 22 | + file-lines: |
| 23 | + config: |
| 24 | + threshold: 1000 |
| 25 | + method-complexity: |
| 26 | + config: |
| 27 | + threshold: 50 |
| 28 | + method-count: |
| 29 | + config: |
| 30 | + threshold: 40 |
| 31 | + method-lines: |
| 32 | + config: |
| 33 | + threshold: 100 |
| 34 | + nested-control-flow: |
| 35 | + config: |
| 36 | + threshold: 4 |
| 37 | + return-statements: |
| 38 | + config: |
| 39 | + threshold: 7 |
| 40 | + similar-code: |
| 41 | + config: |
| 42 | + threshold: 100 |
| 43 | + identical-code: |
| 44 | + config: |
| 45 | + threshold: 150 |
| 46 | + |
| 47 | + |
| 48 | +#engines: |
| 49 | +# duplication: |
| 50 | +# enabled: true |
| 51 | +# config: |
| 52 | +# languages: |
| 53 | +# php: |
| 54 | +# mass_threshold: 50 |
| 55 | +# fixme: |
| 56 | +# enabled: true |
| 57 | +# phpmd: |
| 58 | +# enabled: true |
| 59 | +# exclude_fingerprints: |
| 60 | +# - 9d462b7c90c564bf28007ee399340fad # table() NPath is too complex. |
| 61 | +# - 7c90035f65bb3bdbd2c03c648a705aac # we use static for factory, so it's good |
| 62 | +# - 80ef7f404dd4f054ca51d9ee12d9e9dd # we exit from toStrign() because it can't throw exceptions |
| 63 | +# - ae61f5e0cda0328c140f3b7298dbb8af # don't complain about call to static connection, as it's a fallback |
| 64 | +# - e71149b967391adfaf3347a53d3c0023 # don't complain about $junk used in foreach when we only need keys |
| 65 | +# checks: |
| 66 | +# CyclomaticComplexity: # because we solve complex stuff |
| 67 | +# enabled: false |
| 68 | +# Naming/LongVariable: # because we have variable naming patterns |
| 69 | +# enabled: false |
| 70 | +# UnusedFormalParameter: # because when we extend methods/hooks we wish to keep unified method call interface |
| 71 | +# enabled: false |
| 72 | +# Design/TooManyPublicMethods: # because we follow our internal design patters |
| 73 | +# enabled: false |
| 74 | +# Design/TooManyMethods: # because we solve complex stuff |
| 75 | +# enabled: false |
| 76 | +# Design/LongMethod: # because methods are as long as we need them to be |
| 77 | +# enabled: false |
| 78 | +# ExcessivePublicCount: # because Model has too many public methods |
| 79 | +# enabled: false |
| 80 | +# Design/TooManyFields: # because we solve complex things |
| 81 | +# enabled: false |
| 82 | +# Design/NpathComplexity: # because splitting up complex stuff into methods makes things even more complex |
| 83 | +# enabled: false |
| 84 | +# Design/WeightedMethodCount: # because we we solve complex stuff |
| 85 | +# enabled: false |
| 86 | +# Design/LongClass: # because we design carefully what is native and what is extension |
| 87 | +# enabled: false |
| 88 | +# Controversial/CamelCaseMethodName: # because we need certain method naming patterns, render_blah for rendering [blah] |
| 89 | +# enabled: false |
| 90 | +# Controversial/CamelCaseParameterName: # |
| 91 | +# enabled: false |
| 92 | +# Controversial/CamelCasePropertyName: # because we use _better_dont_change properties |
| 93 | +# enabled: false |
| 94 | +# Controversial/CamelCaseVariableName: # |
| 95 | +# enabled: false |
| 96 | +# Controversial/CamelCaseClassName: # Because we use Join_SQL where we specifically include _ |
| 97 | +# enabled: false |
| 98 | +# Naming/ShortVariable: # because sometimes variables should be short |
| 99 | +# enabled: false |
| 100 | +# CleanCode/ElseExpression: # because following this makes code more complex |
| 101 | +# enabled: false |
| 102 | +# |
| 103 | +# radon: |
| 104 | +# enabled: true |
| 105 | +#ratings: |
| 106 | +# paths: |
| 107 | +# - "src/**" |
| 108 | +#exclude_paths: |
| 109 | +#- "docs/**" |
| 110 | +#- "tests/**" |
| 111 | +#- "vendor/**" |
| 112 | +## exclude obsolete classes |
| 113 | +#- "src/Field_Many.php" |
| 114 | +#- "src/Field_One.php" |
| 115 | +#- "src/Field_SQL_One.php" |
| 116 | +#- "src/Relation_Many.php" |
| 117 | +#- "src/Relation_One.php" |
| 118 | +#- "src/Relation_SQL_One.php" |
| 119 | +## exclude classes completely inherited from other repos |
| 120 | +#- "src/Exception.php" |
0 commit comments