Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Cloogle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cloogle
Cloogle
Commits
162dff55
Verified
Commit
162dff55
authored
Oct 08, 2017
by
Camil Staps
🚀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show a warning when a macro has no @type
parent
f6606482
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
CloogleDBFactory.icl
CloogleDBFactory.icl
+8
-0
No files found.
CloogleDBFactory.icl
View file @
162dff55
...
...
@@ -2,6 +2,7 @@ implementation module CloogleDBFactory
import
StdArray
import
StdBool
import
StdDebug
import
StdFile
from
StdFunc
import
const
,
flip
,
id
,
o
import
StdList
...
...
@@ -286,6 +287,9 @@ where
pd_rewriterules
dcl
defs
st
=
[(
setLine
dcl
pos
{
zero
&
name
=
Just
id
.
id_name
}
,
let
doc
=
findDoc
hideIsUsedReturn
parseFunctionDoc
id
st
in
if
(
needsTypeWarning
doc
)
(
trace_n
$
"Doc warning: expected @type for '"
+++
id
.
id_name
+++
"'"
)
(\
x
->
x
)
{
zero
&
fe_kind
=
Macro
,
fe_type
=
getTypeDoc
=<<
doc
...
...
@@ -309,6 +313,10 @@ where
|
id`
.
id_name
==
id
.
id_name
=
Just
pd
findTypeSpec
id
[_:
defs
]
=
findTypeSpec
id
defs
needsTypeWarning
::
(
Maybe
Documentation
)
->
Bool
needsTypeWarning
Nothing
=
True
needsTypeWarning
(
Just
(
FunctionDoc
_
_
_
_
t
))
=
isNothing
t
pd_derivations
::
!
Bool
![
ParsedDefinition
]
->
[('
DB
'.
Name
,
[('
DB
'.
Type
,
String
,
LocationInModule
)])]
pd_derivations
dcl
defs
=
[(
id
.
id_name
,
[(
'T'
.
toType
gc_type
,
cpp
gc_type
,
setLine
dcl
gc_pos
zero
)])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment