Skip to content

Commit e6d39f1

Browse files
tweak representation of issue location and lift base restriction.
1 parent 9cf1c61 commit e6d39f1

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

codeclimate-shellcheck.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ executable engine
1313
main-is:
1414
Main.hs
1515
build-depends:
16-
base >= 4.7 && < 4.8
16+
base >= 4.7 && < 5
1717
, bytestring
1818
, Glob
1919
hs-source-dirs: src

src/Main.hs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,20 @@ data Category = BugRisk
88
| Security
99
| Style
1010

11+
data BeginEnd = BeginEnd {
12+
_begin :: Int
13+
, _end :: Int
14+
}
15+
1116
data LineColumn = LineColumn {
1217
_line :: Int
1318
, _column :: Int
1419
}
1520

1621
data Position = Coord LineColumn | Offset Int
1722

18-
data BeginEnd = BeginEnd {
19-
_begin :: Int
20-
, _end :: Int
21-
}
22-
23-
data Location = Location {
24-
_path :: FilePath
25-
, _positions :: Maybe Position
26-
, _lines :: Maybe BeginEnd
27-
}
23+
data Location = Lines FilePath BeginEnd
24+
| Positions FilePath Position
2825

2926
data Issue = Issue {
3027
_type :: String

0 commit comments

Comments
 (0)