Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
95a2837f
Commit
95a2837f
authored
Dec 30, 2013
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Not sending hlint messages where there are no suggestions.
parent
41816292
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
Evaluate.hs
IHaskell/Eval/Evaluate.hs
+3
-2
Lint.hs
IHaskell/Eval/Lint.hs
+5
-1
No files found.
IHaskell/Eval/Evaluate.hs
View file @
95a2837f
...
...
@@ -161,7 +161,8 @@ evaluate kernelState code output = do
when
(
getLintStatus
kernelState
/=
LintOff
)
$
liftIO
$
do
lintSuggestions
<-
lint
cmds
output
True
lintSuggestions
unless
(
null
lintSuggestions
)
$
output
True
lintSuggestions
updated
<-
runUntilFailure
kernelState
(
map
unloc
cmds
++
[
storeItCommand
execCount
])
return
updated
{
...
...
@@ -670,4 +671,4 @@ formatGetType :: String -> String
formatGetType
=
printf
"<span style='font-weight: bold; color: green;'>%s</span>"
displayError
::
ErrMsg
->
[
DisplayData
]
displayError
msg
=
[
plain
msg
,
html
$
formatError
msg
]
displayError
msg
=
[
plain
.
typeCleaner
$
msg
,
html
$
formatError
msg
]
IHaskell/Eval/Lint.hs
View file @
95a2837f
...
...
@@ -44,7 +44,11 @@ lint blocks = do
writeFile
(
fromString
filename
)
fileContents
suggestions
<-
catMaybes
<$>
map
parseSuggestion
<$>
hlint
[
filename
,
"--quiet"
]
return
[
plain
$
concatMap
plainSuggestion
suggestions
,
html
$
htmlSuggestions
suggestions
]
return
$
if
null
suggestions
then
[]
else
[
plain
$
concatMap
plainSuggestion
suggestions
,
html
$
htmlSuggestions
suggestions
]
where
-- Join together multiple valid file blocks into a single file.
-- However, join them with padding so that the line numbers are
...
...
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