-
Notifications
You must be signed in to change notification settings - Fork 194
/
.rubocop.yml
146 lines (114 loc) · 3.63 KB
/
.rubocop.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# Redmine plugin for Document Management System "Features"
#
# Karel Pičman <[email protected]>
#
# 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
AllCops:
TargetRubyVersion: 3.2
TargetRailsVersion: 7.1
SuggestExtensions: false
NewCops: enable
Exclude:
- '**/vendor/**/*'
# Enable extensions
require:
- rubocop-performance
- rubocop-rails
# Rules for DMSF
Layout/LineLength:
Exclude:
- app/models/dmsf_query.rb
Lint/SymbolConversion:
Exclude:
- test/unit/dmsf_file_revision_test.rb
Lint/ScriptPermission:
Exclude:
- extra/xapian_indexer.rb
Naming/BlockForwarding:
EnforcedStyle: explicit
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/BlockNesting:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/ParameterLists:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Naming/AccessorMethodName:
Exclude:
- lib/dav4rack/resource.rb
Naming/PredicateName:
Exclude:
- lib/redmine_dmsf/patches/attachable_patch.rb # Easy tests
Style/HashSyntax:
EnforcedShorthandSyntax: either
Style/ZeroLengthPredicate:
Exclude:
- lib/redmine_dmsf/webdav/dmsf_resource.rb
Rails/BulkChangeTable:
Exclude:
- db/migrate/20170217141601_add_dmsf_not_inheritable_to_custom_fields.rb # Easy tests
Rails/DangerousColumnNames:
Exclude:
- db/migrate/20170330131901_create_dmsf_folder_permissions.rb
Rails/DynamicFindBy:
AllowedMethods:
- find_by_token
- find_by_param
Rails/SkipsModelValidations:
Exclude:
- app/helpers/dmsf_upload_helper.rb # touch is Okay
- app/models/dmsf_workflow.rb # update doesn't work here
- lib/redmine_dmsf/patches/user_patch.rb
- lib/redmine_dmsf/patches/role_patch.rb
- db/migrate/20170526144701_dmsf_attachable.rb
- db/migrate/20170421101901_dmsf_file_container_rollback.rb
- db/migrate/20170118142001_dmsf_file_container.rb
- db/migrate/20160222140401_approval_workflow_std_fields.rb
- db/migrate/20160215125801_approval_workflow_status.rb
- db/migrate/20140519133201_trash_bin.rb
- db/migrate/07_dmsf_1_4_4.rb
- db/migrate/20240829093801_rename_dmsf_digest_token.rb
Rails/ThreeStateBooleanColumn:
Exclude:
- db/migrate/04_dmsf_0_9_0.rb # Easy tests
- db/migrate/20170217141601_add_dmsf_not_inheritable_to_custom_fields.rb # Easy tests
Rails/UniqueValidationWithoutIndex:
Exclude:
- app/models/dmsf_folder.rb # TODO: Create a case insensitive index in DB migrations
- app/models/dmsf_file.rb
- app/models/dmsf_workflow_step.rb # Impossible due to steps sorting
Style/ExpandPathArguments:
Enabled: false
Style/FrozenStringLiteralComment:
Exclude:
- init.rb
Style/OpenStructUse:
Exclude:
- lib/dav4rack/utils.rb
Style/OptionalBooleanParameter:
Exclude:
- lib/redmine_dmsf/field_formats/dmsf_file_format.rb
- lib/redmine_dmsf/field_formats/dmsf_file_revision_format.rb