File: flag-only.test

package info (click to toggle)
hlint 3.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 980 kB
  • sloc: haskell: 7,035; lisp: 86; makefile: 5
file content (30 lines) | stat: -rw-r--r-- 853 bytes parent folder | download | duplicates (2)
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
---------------------------------------------------------------------
RUN tests/flag-only-one-arg.hs --only="Redundant bracket"
FILE tests/flag-only-one-arg.hs
foo xs = if length xs == 0 then 42 else (666) -- should result in 2 suggestions
OUTPUT
tests/flag-only-one-arg.hs:1:41-45: Warning: Redundant bracket
Found:
  (666)
Perhaps:
  666

1 hint
---------------------------------------------------------------------
RUN tests/flag-only-many-args.hs --only="Redundant bracket" --only="Use ++"
FILE tests/flag-only-many-args.hs
foo xs = if length xs == 0 then concat ["foo", "bar"] else (666) -- should result in 3 suggestions
OUTPUT
tests/flag-only-many-args.hs:1:33-53: Suggestion: Use ++
Found:
  concat ["foo", "bar"]
Perhaps:
  "foo" ++ "bar"

tests/flag-only-many-args.hs:1:60-64: Warning: Redundant bracket
Found:
  (666)
Perhaps:
  666

2 hints