update hlint to 3.8 and prevent linting on testdata dir#4018
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
| uses: rwe/actions-hlint-run@v2 | ||
| with: | ||
| hlint-bin: "hlint --with-group=extra" | ||
| hlint-bin: "hlint --with-group=extra --ignore-glob=**/testdata/** --ignore-glob=**/test/data/**" |
There was a problem hiding this comment.
Can you leave a comment with a link to the hlint issue so we know to move this back into the config file when it gets fixed?
There was a problem hiding this comment.
I dig into the hlint source code and found this. There is no option to configure the ignore glob, 0 0. Also no issue in hlint about this.
allowFields v ["lhs","rhs","note","name","side"]
let hintRuleScope = mempty
pure $
Left HintRule {hintRuleSeverity = severity, hintRuleLHS = extendInstances lhs, hintRuleRHS = extendInstances rhs, ..}
: [Right $ Classify severity hintRuleName "" "" | not isBuiltin]
else do
names <- parseFieldOpt "name" v >>= maybe (pure []) parseArrayString
within <- parseFieldOpt "within" v >>= maybe (pure [("","")]) (parseArray >=> concatMapM parseWithin)
pure [Right $ Classify severity n a b | (a,b) <- within, n <- ["" | null names] ++ names]
There was a problem hiding this comment.
correction: within field is just about module by module
There was a problem hiding this comment.
The only source code I see about using ignoring glob is
ignore = (toPredicate $ cmdIgnoreGlob cmd)
toPredicate :: [FilePattern] -> FilePath -> Bool
toPredicate [] = const False
toPredicate globs = \x -> not $ null $ m [((), cleanup x)]
where m = matchMany (map ((),) globs)
where cmdIgnoreGlob is only picked up by commandline arg
There was a problem hiding this comment.
I mean, didn't you do ndmitchell/hlint#1554 ? So we can fix put this back once that is released?
There was a problem hiding this comment.
Oh that one is about apply the ignoring glob correctly, it is already included in the hlint 3.8 realease.
Before that, even with commandline ignoring glob, we won't be ignoring some files.
I thought that one would fix config file problem, but I was wrong.
There was a problem hiding this comment.
ndmitchell/hlint#1554 is the reason we need to bump up to 3.8
This is a following up of #3901
I dig a bit into hlint.