inch 0.5.0.rc11 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d83477cb56f05fa36eae43b8a5207cccf6160b53
4
- data.tar.gz: 89554aa7ecb0f7845ebeaca9851eb8daa0e735e3
3
+ metadata.gz: 99ee504d6210614f2efc8b488d61a6106e8943af
4
+ data.tar.gz: 483a0a52a59e8b601cb3c847c9d40f2b0f483ea4
5
5
  SHA512:
6
- metadata.gz: 6d7282dabbec8ed4f730eac1d7511f507c3dd260f8820ee8edaefe0fd385e902c0b7003c455487b90ae91596f1d9e2a0235e7cb102f6b2ab52a999d5872d3c4e
7
- data.tar.gz: f2ee1b8f2716a954873e14fb7d58f8b1bd11c18182e8c1ee3bddedaf80f580a99d82b6c1e6518b6346b9cf559f25e40a22ff48f3aa22a78b52f371ce6c149312
6
+ metadata.gz: bade489d8eccd40e48bef4dfb2a86529ca5e58d1b804f8d75e4f5f68629fc09780e456f340f41db576207d55a21b66b14f08df6cfeac20b7782b68690f9b2094
7
+ data.tar.gz: 589ef72d6e520477c5b5d0ac280759bfb17de27a1674f33e503c04ee1044e864ea2ae35f3197ab4c6a883ab843c5423914d1f741c117defae6e72f98abe60a12
data/.rubocop_todo.yml CHANGED
@@ -1,11 +1,11 @@
1
1
  # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2014-08-31 11:34:00 +0200 using RuboCop version 0.25.0.
2
+ # on 2014-10-06 22:11:42 +0200 using RuboCop version 0.25.0.
3
3
  # The point is for the user to remove these configuration records
4
4
  # one by one as the offenses are removed from the code base.
5
5
  # Note that changes in the inspected code, or installation of new
6
6
  # versions of RuboCop, may require this file to be generated again.
7
7
 
8
- # Offense count: 34
8
+ # Offense count: 51
9
9
  Lint/AmbiguousOperator:
10
10
  Enabled: false
11
11
 
@@ -13,30 +13,38 @@ Lint/AmbiguousOperator:
13
13
  Lint/Debugger:
14
14
  Enabled: false
15
15
 
16
- # Offense count: 16
16
+ # Offense count: 29
17
17
  Lint/SpaceBeforeFirstArg:
18
18
  Enabled: false
19
19
 
20
- # Offense count: 9
20
+ # Offense count: 1
21
+ Lint/UnderscorePrefixedVariableName:
22
+ Enabled: false
23
+
24
+ # Offense count: 12
21
25
  # Cop supports --auto-correct.
22
26
  Lint/UnusedMethodArgument:
27
+ Enabled: true
28
+
29
+ # Offense count: 1
30
+ Lint/UselessAccessModifier:
23
31
  Enabled: false
24
32
 
25
- # Offense count: 7
33
+ # Offense count: 8
26
34
  # Configuration parameters: CountComments.
27
35
  Metrics/ClassLength:
28
- Max: 197
36
+ Max: 196
29
37
 
30
38
  # Offense count: 2
31
39
  Metrics/CyclomaticComplexity:
32
40
  Max: 7
33
41
 
34
- # Offense count: 1
42
+ # Offense count: 9
35
43
  # Configuration parameters: AllowURI.
36
44
  Metrics/LineLength:
37
- Max: 81
45
+ Max: 368
38
46
 
39
- # Offense count: 27
47
+ # Offense count: 28
40
48
  # Configuration parameters: CountComments.
41
49
  Metrics/MethodLength:
42
50
  Max: 34
@@ -54,7 +62,13 @@ Style/AccessorMethodName:
54
62
  Style/ClassAndModuleChildren:
55
63
  Enabled: false
56
64
 
57
- # Offense count: 87
65
+ # Offense count: 1
66
+ # Cop supports --auto-correct.
67
+ # Configuration parameters: PreferredMethods.
68
+ Style/CollectionMethods:
69
+ Enabled: false
70
+
71
+ # Offense count: 90
58
72
  Style/Documentation:
59
73
  Enabled: false
60
74
 
@@ -62,10 +76,20 @@ Style/Documentation:
62
76
  Style/DoubleNegation:
63
77
  Enabled: false
64
78
 
65
- # Offense count: 11
79
+ # Offense count: 2
80
+ # Cop supports --auto-correct.
81
+ Style/EmptyLines:
82
+ Enabled: false
83
+
84
+ # Offense count: 3
85
+ # Cop supports --auto-correct.
86
+ Style/EmptyLinesAroundBody:
87
+ Enabled: false
88
+
89
+ # Offense count: 12
66
90
  # Configuration parameters: MinBodyLength.
67
91
  Style/GuardClause:
68
- Enabled: false
92
+ Enabled: true
69
93
 
70
94
  # Offense count: 1
71
95
  # Cop supports --auto-correct.
@@ -78,23 +102,71 @@ Style/HashSyntax:
78
102
  Style/IfUnlessModifier:
79
103
  Enabled: false
80
104
 
81
- # Offense count: 43
105
+ # Offense count: 1
106
+ # Cop supports --auto-correct.
107
+ Style/LeadingCommentSpace:
108
+ Enabled: false
109
+
110
+ # Offense count: 1
111
+ # Cop supports --auto-correct.
112
+ Style/PerlBackrefs:
113
+ Enabled: false
114
+
115
+ # Offense count: 54
82
116
  # Configuration parameters: NamePrefixBlacklist.
83
117
  Style/PredicateName:
84
118
  Enabled: false
85
119
 
120
+ # Offense count: 1
121
+ Style/RegexpLiteral:
122
+ MaxSlashes: 4
123
+
86
124
  # Offense count: 2
87
125
  # Configuration parameters: Methods.
88
126
  Style/SingleLineBlockParams:
89
127
  Enabled: false
90
128
 
91
- # Offense count: 82
129
+ # Offense count: 104
92
130
  # Cop supports --auto-correct.
93
131
  Style/SingleSpaceBeforeFirstArg:
94
132
  Enabled: false
95
133
 
134
+ # Offense count: 15
135
+ # Cop supports --auto-correct.
136
+ Style/SpaceInsideBrackets:
137
+ Enabled: false
138
+
139
+ # Offense count: 3
140
+ # Cop supports --auto-correct.
141
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
142
+ Style/SpaceInsideHashLiteralBraces:
143
+ Enabled: false
144
+
145
+ # Offense count: 31
146
+ # Cop supports --auto-correct.
147
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
148
+ Style/StringLiterals:
149
+ Enabled: true
150
+
151
+ # Offense count: 1
152
+ # Cop supports --auto-correct.
153
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
154
+ Style/TrailingBlankLines:
155
+ Enabled: false
156
+
157
+ # Offense count: 2
158
+ # Cop supports --auto-correct.
159
+ # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
160
+ Style/TrailingComma:
161
+ Enabled: false
162
+
96
163
  # Offense count: 4
97
164
  # Cop supports --auto-correct.
98
165
  # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
99
166
  Style/TrivialAccessors:
100
167
  Enabled: false
168
+
169
+ # Offense count: 1
170
+ # Cop supports --auto-correct.
171
+ Style/WordArray:
172
+ MinSize: 2
data/.travis.yml CHANGED
@@ -1,8 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
- - 2.0.0
4
+ - 2.0
5
5
  - 2.1
6
+ - 2.2
6
7
  - ruby-head
7
8
  - jruby-head
8
9
  - jruby-19mode
data/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # Changelog
2
2
 
3
- ## 0.4.11 (pre)
3
+ ## 0.5.0
4
+
5
+ - Multi-language support was added
6
+ - Basic Elixir capabilities were added
7
+ - TomDoc compatibility was improved
8
+ - stty warning when reading terminal size was fixed
9
+ - Many Rubocop alerts were fixed (thanks @yous)
10
+
11
+ ## 0.4.11
4
12
 
5
13
  - Add `undefined` to the list of values used to indicate that a return value
6
14
  is not intended for further use. The current list is `nil`, `nothing`,
@@ -69,7 +69,7 @@ module Inch
69
69
  priority_list.empty? ? list : priority_list)
70
70
  end
71
71
 
72
- def all_filenames(objects)
72
+ def all_filenames(_objects)
73
73
  codebase.objects.map do |o|
74
74
  o.files.map(&:filename)
75
75
  end.flatten
@@ -17,7 +17,7 @@ module Inch
17
17
  # @param [Array<String>] args the arguments passed from input. This
18
18
  # array will be modified.
19
19
  # @return [void]
20
- def parse_yardopts_options(opts, args)
20
+ def parse_yardopts_options(_opts, args)
21
21
  wrapper = YardoptsWrapper.new
22
22
 
23
23
  dupped_args = args.dup
@@ -8,7 +8,7 @@ module Inch
8
8
 
9
9
  private
10
10
 
11
- def self.class_for(language, code_object)
11
+ def self.class_for(_language, code_object)
12
12
  class_name = code_object.class.to_s.split('::').last
13
13
  language_namespace = Evaluation::Ruby
14
14
  language_namespace.const_get(class_name)
@@ -52,6 +52,10 @@ module Inch
52
52
  self[:typed?]
53
53
  end
54
54
 
55
+ def unnamed?
56
+ name == ''
57
+ end
58
+
55
59
  # @return [Boolean] +true+ if the parameter is mentioned in the docs,
56
60
  # but not present in the method's signature
57
61
  def wrongly_mentioned?
@@ -41,14 +41,16 @@ module Inch
41
41
  }
42
42
  end
43
43
 
44
- def relevant_parameter_roles(param, per_param)
44
+ def relevant_parameter_roles(_param, per_param)
45
+ score_for_mention = per_param
46
+ score_for_type = 0
45
47
  {
46
48
  Role::FunctionParameter::WithWrongMention =>
47
49
  -score_for(:parameters),
48
- Role::FunctionParameter::WithMention => per_param * 0.5,
49
- Role::FunctionParameter::WithoutMention => per_param * 0.5,
50
- Role::FunctionParameter::WithType => per_param * 0.5,
51
- Role::FunctionParameter::WithoutType => per_param * 0.5,
50
+ Role::FunctionParameter::WithMention => score_for_mention,
51
+ Role::FunctionParameter::WithoutMention => score_for_mention,
52
+ Role::FunctionParameter::WithType => score_for_type,
53
+ Role::FunctionParameter::WithoutType => score_for_type,
52
54
  Role::FunctionParameter::WithBadName => nil,
53
55
  }
54
56
  end
@@ -88,7 +88,7 @@ module Inch
88
88
  end
89
89
 
90
90
  def has_code_example?
91
- false # raise NotImplementedError
91
+ docstring.code_examples.size > 0
92
92
  end
93
93
 
94
94
  def has_doc?
@@ -96,7 +96,7 @@ module Inch
96
96
  end
97
97
 
98
98
  def has_multiple_code_examples?
99
- false # raise NotImplementedError
99
+ docstring.code_examples.size > 1
100
100
  end
101
101
 
102
102
  def has_unconsidered_tags?
@@ -41,7 +41,7 @@ module Inch
41
41
  if b.nil? || b == 'Elixir'
42
42
  a
43
43
  else
44
- if a == "\\\\"
44
+ if a == '\\\\'
45
45
  name_from_tuple(*b.first)
46
46
  else
47
47
  warn "[WARN] could not parse FunctionSignature: #{[a, _, b].inspect}"
@@ -53,7 +53,7 @@ module Inch
53
53
 
54
54
  private
55
55
 
56
- def parse_objects(paths, excluded, read_dump_file = nil)
56
+ def parse_objects(_paths, _excluded, read_dump_file = nil)
57
57
  if read_dump_file.nil?
58
58
  fail 'Elixir analysis only works with --read-from-dump.'
59
59
  else
@@ -11,14 +11,19 @@ module Inch
11
11
  #
12
12
  # @see CodeObject::Ruby::MethodParameterObject#mentioned?
13
13
  class WithMention < Base
14
- applicable_if :mentioned?
14
+ applicable_if do |p|
15
+ # unnamed parameters are mentioned implicitly
16
+ p.mentioned? || p.unnamed?
17
+ end
15
18
  end
16
19
 
17
20
  # Role assigned to parameters that are not mentioned in the docs
18
21
  #
19
22
  # @see CodeObject::Ruby::MethodParameterObject#mentioned?
20
23
  class WithoutMention < Missing
21
- applicable_unless :mentioned?
24
+ applicable_if do |p|
25
+ !p.mentioned? && !p.unnamed?
26
+ end
22
27
 
23
28
  def suggestion
24
29
  "Describe the parameter '#{object.name}'"
@@ -39,7 +39,7 @@ module Inch
39
39
  }
40
40
  end
41
41
 
42
- def relevant_parameter_roles(param, per_param)
42
+ def relevant_parameter_roles(_param, per_param)
43
43
  {
44
44
  Role::FunctionParameter::WithWrongMention =>
45
45
  -score_for(:parameters),
@@ -42,7 +42,7 @@ module Inch
42
42
 
43
43
  private
44
44
 
45
- def parse_objects(paths, excluded, read_dump_file = nil)
45
+ def parse_objects(_paths, _excluded, read_dump_file = nil)
46
46
  if read_dump_file.nil?
47
47
  fail 'NodeJS analysis only works with --read-from-dump.'
48
48
  else
@@ -51,7 +51,7 @@ module Inch
51
51
  }
52
52
  end
53
53
 
54
- def relevant_parameter_roles(param, per_param)
54
+ def relevant_parameter_roles(_param, per_param)
55
55
  {
56
56
  Role::MethodParameter::WithWrongMention =>
57
57
  -score_for(:parameters),
@@ -44,14 +44,14 @@ module Inch
44
44
 
45
45
  def mentions_return?
46
46
  last_lines.any? do |line|
47
- line =~ /^#{tomdoc_modifiers}Returns\ /
47
+ line =~ /^#{tomdoc_modifiers}(Returns|Gets|Sets|Gets\/Sets)\ /
48
48
  end
49
49
  end
50
50
 
51
51
  def describes_return?
52
52
  last_lines.any? do |line|
53
- line =~ /^#{tomdoc_modifiers}Returns\ (\w+\s){2,}/i ||
54
- line =~ /^#{tomdoc_modifiers}Returns\ (nil|nothing)\.*/i
53
+ line =~ /^#{tomdoc_modifiers}(Returns|Gets|Sets|Gets\/Sets)\ (\w+\s){2,}/i ||
54
+ line =~ /^#{tomdoc_modifiers}(Returns|Gets|Sets|Gets\/Sets)\ (nil|nothing)\.*/i
55
55
  end
56
56
  end
57
57
 
@@ -111,7 +111,7 @@ module Inch
111
111
  /\+#{expr}\+\:\:/, # +param1+::
112
112
  /<tt>#{expr}<\/tt>/, # <tt>param1</tt>
113
113
  /<tt>#{expr}<\/tt>\:\:/, # <tt>param1</tt>::
114
- /^#{expr}\ \-\ / # param1 -
114
+ /^#{expr}\ +\-\ / # param1 -
115
115
  ]
116
116
  end
117
117
 
@@ -3,7 +3,7 @@ module Inch
3
3
  class BufferedUI < UI
4
4
  attr_reader :out, :err
5
5
 
6
- def initialize(stdout = $stdout, stderr = $stderr)
6
+ def initialize(_stdout = $stdout, _stderr = $stderr)
7
7
  @io = StringIO.new
8
8
  super(@io, @io)
9
9
  end
data/lib/inch/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Inch
2
- VERSION = '0.5.0.rc11'
2
+ VERSION = '0.5.0'
3
3
  end
@@ -0,0 +1,609 @@
1
+ {
2
+ "args": [
3
+ "inspect",
4
+ "InchTest.Functions."
5
+ ],
6
+ "git_repo_url": "git@github.com:inch-ci/Hello-World-Elixir.git",
7
+ "language": "elixir",
8
+ "objects": [
9
+ {
10
+ "id": "InchTest",
11
+ "module": "Elixir.InchTest",
12
+ "moduledoc": null,
13
+ "object_type": "ModuleObject",
14
+ "source": null,
15
+ "type": null,
16
+ "typespecs": []
17
+ },
18
+ {
19
+ "id": "InchTest.CodeExamples",
20
+ "module": "Elixir.InchTest.CodeExamples",
21
+ "moduledoc": null,
22
+ "object_type": "ModuleObject",
23
+ "source": null,
24
+ "type": null,
25
+ "typespecs": []
26
+ },
27
+ {
28
+ "id": "InchTest.Config",
29
+ "module": "Elixir.InchTest.Config",
30
+ "moduledoc": null,
31
+ "object_type": "ModuleObject",
32
+ "source": null,
33
+ "type": null,
34
+ "typespecs": []
35
+ },
36
+ {
37
+ "id": "InchTest.Docs.Formatter",
38
+ "module": "Elixir.InchTest.Docs.Formatter",
39
+ "moduledoc": "Provide JSON-formatted documentation\n",
40
+ "object_type": "ModuleObject",
41
+ "source": null,
42
+ "type": null,
43
+ "typespecs": []
44
+ },
45
+ {
46
+ "id": "InchTest.Docs.Retriever",
47
+ "module": "Elixir.InchTest.Docs.Retriever",
48
+ "moduledoc": "Functions to extract documentation information from modules.\n",
49
+ "object_type": "ModuleObject",
50
+ "source": null,
51
+ "type": null,
52
+ "typespecs": []
53
+ },
54
+ {
55
+ "id": "InchTest.Docs.Retriever.Error",
56
+ "module": "Elixir.InchTest.Docs.Retriever.Error",
57
+ "moduledoc": null,
58
+ "object_type": "ModuleObject",
59
+ "source": null,
60
+ "type": "exception",
61
+ "typespecs": []
62
+ },
63
+ {
64
+ "id": "InchTest.FunctionObject",
65
+ "module": "Elixir.InchTest.FunctionObject",
66
+ "moduledoc": null,
67
+ "object_type": "ModuleObject",
68
+ "source": null,
69
+ "type": null,
70
+ "typespecs": []
71
+ },
72
+ {
73
+ "id": "InchTest.Functions",
74
+ "module": "Elixir.InchTest.Functions",
75
+ "moduledoc": " In this module we define funs that are \"cases\" for our test suite.\n",
76
+ "object_type": "ModuleObject",
77
+ "source": null,
78
+ "type": null,
79
+ "typespecs": []
80
+ },
81
+ {
82
+ "id": "InchTest.ModuleObject",
83
+ "module": "Elixir.InchTest.ModuleObject",
84
+ "moduledoc": null,
85
+ "object_type": "ModuleObject",
86
+ "source": null,
87
+ "type": null,
88
+ "typespecs": []
89
+ },
90
+ {
91
+ "id": "InchTest.Naming",
92
+ "module": "Elixir.InchTest.Naming",
93
+ "moduledoc": null,
94
+ "object_type": "ModuleObject",
95
+ "source": null,
96
+ "type": null,
97
+ "typespecs": []
98
+ },
99
+ {
100
+ "id": "InchTest.TypeObject",
101
+ "module": "Elixir.InchTest.TypeObject",
102
+ "moduledoc": null,
103
+ "object_type": "ModuleObject",
104
+ "source": null,
105
+ "type": null,
106
+ "typespecs": []
107
+ },
108
+ {
109
+ "arity": 4,
110
+ "doc": false,
111
+ "id": "generate_docs/4",
112
+ "module_id": "InchTest",
113
+ "name": "generate_docs",
114
+ "object_type": "FunctionObject",
115
+ "signature": [
116
+ [
117
+ "project",
118
+ [],
119
+ null
120
+ ],
121
+ [
122
+ "version",
123
+ [],
124
+ null
125
+ ],
126
+ [
127
+ "args",
128
+ [],
129
+ null
130
+ ],
131
+ [
132
+ "options",
133
+ [],
134
+ null
135
+ ]
136
+ ],
137
+ "source": null,
138
+ "specs": [],
139
+ "type": "def"
140
+ },
141
+ {
142
+ "arity": 0,
143
+ "doc": "Converts String to underscore case\n\n## Examples\n\n iex> InchTest.Naming.underscore(\"MyApp\")\n \"my_app\"\n\n iex> InchTest.Naming.underscore(\"my-app\")\n \"my_app\"\n\nIn general, `underscore` can be thought of as the reverse of\n`camelize`, however, in some cases formatting may be lost:\n\n Naming.underscore \"SAPExample\" #=> \"sap_example\"\n Naming.camelize \"sap_example\" #=> \"SapExample\"\n\n",
144
+ "id": "multiple_code_examples/0",
145
+ "module_id": "InchTest.CodeExamples",
146
+ "name": "multiple_code_examples",
147
+ "object_type": "FunctionObject",
148
+ "signature": [],
149
+ "source": null,
150
+ "specs": [],
151
+ "type": "def"
152
+ },
153
+ {
154
+ "arity": 0,
155
+ "doc": "Extracts the resource name from an alias\n\n## Examples\n\n iex> InchTest.Naming.resource_name(MyApp.User)\n \"user\"\n iex> InchTest.Naming.resource_name(MyApp.UserView, \"View\")\n \"user\"\n",
156
+ "id": "single_code_example/0",
157
+ "module_id": "InchTest.CodeExamples",
158
+ "name": "single_code_example",
159
+ "object_type": "FunctionObject",
160
+ "signature": [],
161
+ "source": null,
162
+ "specs": [],
163
+ "type": "def"
164
+ },
165
+ {
166
+ "arity": 3,
167
+ "doc": "Generate JSON documentation for the given modules\n",
168
+ "id": "run/3",
169
+ "module_id": "InchTest.Docs.Formatter",
170
+ "name": "run",
171
+ "object_type": "FunctionObject",
172
+ "signature": [
173
+ [
174
+ "modules",
175
+ [],
176
+ null
177
+ ],
178
+ [
179
+ "args",
180
+ [],
181
+ null
182
+ ],
183
+ [
184
+ "config",
185
+ [],
186
+ null
187
+ ]
188
+ ],
189
+ "source": null,
190
+ "specs": [],
191
+ "type": "def"
192
+ },
193
+ {
194
+ "arity": 2,
195
+ "doc": "Extract documentation from all modules in the specified directory\n",
196
+ "id": "docs_from_dir/2",
197
+ "module_id": "InchTest.Docs.Retriever",
198
+ "name": "docs_from_dir",
199
+ "object_type": "FunctionObject",
200
+ "signature": [
201
+ [
202
+ "dir",
203
+ [],
204
+ null
205
+ ],
206
+ [
207
+ "config",
208
+ [],
209
+ null
210
+ ]
211
+ ],
212
+ "source": null,
213
+ "specs": [],
214
+ "type": "def"
215
+ },
216
+ {
217
+ "arity": 2,
218
+ "doc": "Extract documentation from all modules in the specified list of files\n",
219
+ "id": "docs_from_files/2",
220
+ "module_id": "InchTest.Docs.Retriever",
221
+ "name": "docs_from_files",
222
+ "object_type": "FunctionObject",
223
+ "signature": [
224
+ [
225
+ "files",
226
+ [],
227
+ null
228
+ ],
229
+ [
230
+ "config",
231
+ [],
232
+ null
233
+ ]
234
+ ],
235
+ "source": null,
236
+ "specs": [],
237
+ "type": "def"
238
+ },
239
+ {
240
+ "arity": 2,
241
+ "doc": "Extract documentation from all modules in the list `modules`\n",
242
+ "id": "docs_from_modules/2",
243
+ "module_id": "InchTest.Docs.Retriever",
244
+ "name": "docs_from_modules",
245
+ "object_type": "FunctionObject",
246
+ "signature": [
247
+ [
248
+ "modules",
249
+ [],
250
+ null
251
+ ],
252
+ [
253
+ "config",
254
+ [],
255
+ null
256
+ ]
257
+ ],
258
+ "source": null,
259
+ "specs": [],
260
+ "type": "def"
261
+ },
262
+ {
263
+ "arity": 1,
264
+ "doc": "Callback implementation of `Exception.exception/1`.",
265
+ "id": "exception/1",
266
+ "module_id": "InchTest.Docs.Retriever.Error",
267
+ "name": "exception",
268
+ "object_type": "FunctionObject",
269
+ "signature": [
270
+ [
271
+ "args",
272
+ [],
273
+ null
274
+ ]
275
+ ],
276
+ "source": null,
277
+ "specs": [
278
+ [
279
+ "::",
280
+ {
281
+ "line": 21
282
+ },
283
+ [
284
+ [
285
+ "exception",
286
+ {
287
+ "line": 21
288
+ },
289
+ [
290
+ [
291
+ [
292
+ ".",
293
+ {
294
+ "line": 21
295
+ },
296
+ [
297
+ "Elixir.Keyword",
298
+ "t"
299
+ ]
300
+ ],
301
+ {
302
+ "line": 21
303
+ },
304
+ []
305
+ ]
306
+ ]
307
+ ],
308
+ [
309
+ [
310
+ ".",
311
+ {
312
+ "line": 21
313
+ },
314
+ [
315
+ "Elixir.Exception",
316
+ "t"
317
+ ]
318
+ ],
319
+ {
320
+ "line": 21
321
+ },
322
+ []
323
+ ]
324
+ ]
325
+ ]
326
+ ],
327
+ "type": "def"
328
+ },
329
+ {
330
+ "arity": 1,
331
+ "doc": "Callback implementation of `Exception.message/1`.",
332
+ "id": "message/1",
333
+ "module_id": "InchTest.Docs.Retriever.Error",
334
+ "name": "message",
335
+ "object_type": "FunctionObject",
336
+ "signature": [
337
+ [
338
+ "exception",
339
+ [],
340
+ null
341
+ ]
342
+ ],
343
+ "source": null,
344
+ "specs": [
345
+ [
346
+ "::",
347
+ {
348
+ "line": 21
349
+ },
350
+ [
351
+ [
352
+ "message",
353
+ {
354
+ "line": 21
355
+ },
356
+ [
357
+ [
358
+ [
359
+ ".",
360
+ {
361
+ "line": 21
362
+ },
363
+ [
364
+ "Elixir.Exception",
365
+ "t"
366
+ ]
367
+ ],
368
+ {
369
+ "line": 21
370
+ },
371
+ []
372
+ ]
373
+ ]
374
+ ],
375
+ [
376
+ [
377
+ ".",
378
+ {
379
+ "line": 21
380
+ },
381
+ [
382
+ "Elixir.String",
383
+ "t"
384
+ ]
385
+ ],
386
+ {
387
+ "line": 21
388
+ },
389
+ []
390
+ ]
391
+ ]
392
+ ]
393
+ ],
394
+ "type": "def"
395
+ },
396
+ {
397
+ "arity": 2,
398
+ "doc": "This fun takes `param1` and `param2` as arguments.\n\n## Examples\n\n iex> InchTest.Naming.resource_name(MyApp.User)\n \"user\"\n iex> InchTest.Naming.resource_name(MyApp.UserView, \"View\")\n \"user\"\n",
399
+ "id": "full_doc/2",
400
+ "module_id": "InchTest.Functions",
401
+ "name": "full_doc",
402
+ "object_type": "FunctionObject",
403
+ "signature": [
404
+ [
405
+ "param1",
406
+ [],
407
+ null
408
+ ],
409
+ [
410
+ "param2",
411
+ [],
412
+ null
413
+ ]
414
+ ],
415
+ "source": null,
416
+ "specs": [],
417
+ "type": "def"
418
+ },
419
+ {
420
+ "arity": 2,
421
+ "doc": "This fun takes a `param1` and a second parameter that is never used\n(maybe, because it is a callback or something like that). However, the\nsecond param should impact the evaluation by Inch.\n\n## Examples\n\n iex> InchTest.Naming.resource_name(MyApp.User)\n \"user\"\n iex> InchTest.Naming.resource_name(MyApp.UserView, \"View\")\n \"user\"\n",
422
+ "id": "full_doc_second_parameter_unnamed/2",
423
+ "module_id": "InchTest.Functions",
424
+ "name": "full_doc_second_parameter_unnamed",
425
+ "object_type": "FunctionObject",
426
+ "signature": [
427
+ [
428
+ "param1",
429
+ [],
430
+ null
431
+ ],
432
+ [
433
+ "",
434
+ [],
435
+ "Elixir"
436
+ ]
437
+ ],
438
+ "source": null,
439
+ "specs": [],
440
+ "type": "def"
441
+ },
442
+ {
443
+ "arity": 1,
444
+ "doc": "Converts String to camel case\n\n## Examples\n\n iex> InchTest.Naming.camelize(\"my_app\")\n \"MyApp\"\n\nIn general, `camelize` can be thought of as the reverse of\n`underscore`, however, in some cases formatting may be lost:\n\n InchTest.Naming.underscore \"SAPExample\" #=> \"sap_example\"\n InchTest.Naming.camelize \"sap_example\" #=> \"SapExample\"\n\n",
445
+ "id": "camelize/1",
446
+ "module_id": "InchTest.Naming",
447
+ "name": "camelize",
448
+ "object_type": "FunctionObject",
449
+ "signature": [
450
+ [
451
+ "arg1",
452
+ [],
453
+ "Elixir"
454
+ ]
455
+ ],
456
+ "source": null,
457
+ "specs": [],
458
+ "type": "def"
459
+ },
460
+ {
461
+ "arity": 1,
462
+ "doc": null,
463
+ "id": "do_camelize/1",
464
+ "module_id": "InchTest.Naming",
465
+ "name": "do_camelize",
466
+ "object_type": "FunctionObject",
467
+ "signature": [
468
+ [
469
+ "arg1",
470
+ [],
471
+ "Elixir"
472
+ ]
473
+ ],
474
+ "source": null,
475
+ "specs": [],
476
+ "type": "def"
477
+ },
478
+ {
479
+ "arity": 2,
480
+ "doc": null,
481
+ "id": "do_underscore/2",
482
+ "module_id": "InchTest.Naming",
483
+ "name": "do_underscore",
484
+ "object_type": "FunctionObject",
485
+ "signature": [
486
+ [
487
+ "arg1",
488
+ [],
489
+ "Elixir"
490
+ ],
491
+ [
492
+ "prev",
493
+ [],
494
+ null
495
+ ]
496
+ ],
497
+ "source": null,
498
+ "specs": [],
499
+ "type": "def"
500
+ },
501
+ {
502
+ "arity": 2,
503
+ "doc": null,
504
+ "id": "remove_suffix/2",
505
+ "module_id": "InchTest.Naming",
506
+ "name": "remove_suffix",
507
+ "object_type": "FunctionObject",
508
+ "signature": [
509
+ [
510
+ "alias",
511
+ [],
512
+ null
513
+ ],
514
+ [
515
+ "suffix",
516
+ [],
517
+ null
518
+ ]
519
+ ],
520
+ "source": null,
521
+ "specs": [],
522
+ "type": "def"
523
+ },
524
+ {
525
+ "arity": 2,
526
+ "doc": "Extracts the resource name from an alias\n\n## Examples\n\n iex> InchTest.Naming.resource_name(MyApp.User)\n \"user\"\n iex> InchTest.Naming.resource_name(MyApp.UserView, \"View\")\n \"user\"\n\n",
527
+ "id": "resource_name/2",
528
+ "module_id": "InchTest.Naming",
529
+ "name": "resource_name",
530
+ "object_type": "FunctionObject",
531
+ "signature": [
532
+ [
533
+ "alias",
534
+ [],
535
+ null
536
+ ],
537
+ [
538
+ "\\\\",
539
+ [],
540
+ [
541
+ [
542
+ "suffix",
543
+ [],
544
+ null
545
+ ],
546
+ null
547
+ ]
548
+ ]
549
+ ],
550
+ "source": null,
551
+ "specs": [],
552
+ "type": "def"
553
+ },
554
+ {
555
+ "arity": 1,
556
+ "doc": null,
557
+ "id": "to_lower_char/1",
558
+ "module_id": "InchTest.Naming",
559
+ "name": "to_lower_char",
560
+ "object_type": "FunctionObject",
561
+ "signature": [
562
+ [
563
+ "char",
564
+ [],
565
+ null
566
+ ]
567
+ ],
568
+ "source": null,
569
+ "specs": [],
570
+ "type": "def"
571
+ },
572
+ {
573
+ "arity": 1,
574
+ "doc": null,
575
+ "id": "to_upper_char/1",
576
+ "module_id": "InchTest.Naming",
577
+ "name": "to_upper_char",
578
+ "object_type": "FunctionObject",
579
+ "signature": [
580
+ [
581
+ "char",
582
+ [],
583
+ null
584
+ ]
585
+ ],
586
+ "source": null,
587
+ "specs": [],
588
+ "type": "def"
589
+ },
590
+ {
591
+ "arity": 1,
592
+ "doc": "Converts String to underscore case\n\n## Examples\n\n iex> InchTest.Naming.underscore(\"MyApp\")\n \"my_app\"\n\n iex> InchTest.Naming.underscore(\"my-app\")\n \"my_app\"\n\nIn general, `underscore` can be thought of as the reverse of\n`camelize`, however, in some cases formatting may be lost:\n\n Naming.underscore \"SAPExample\" #=> \"sap_example\"\n Naming.camelize \"sap_example\" #=> \"SapExample\"\n\n",
593
+ "id": "underscore/1",
594
+ "module_id": "InchTest.Naming",
595
+ "name": "underscore",
596
+ "object_type": "FunctionObject",
597
+ "signature": [
598
+ [
599
+ "arg1",
600
+ [],
601
+ "Elixir"
602
+ ]
603
+ ],
604
+ "source": null,
605
+ "specs": [],
606
+ "type": "def"
607
+ }
608
+ ]
609
+ }