-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Infinite: base/reverse | ||
# Usage of the 'reverse' function that hangs on infinite lists | ||
# Pantry uses Data.List.reverse in many places | ||
[[check]] | ||
id = "STAN-0101" | ||
scope = "all" | ||
type = "Exclude" | ||
|
||
# Anti-pattern: Data.ByteString.Char8.pack | ||
[[ignore]] | ||
id = "OBS-STAN-0203-RDkR59-110:17" | ||
# ✦ Description: Usage of 'pack' function that doesn't handle Unicode characters | ||
# ✦ Category: #AntiPattern | ||
# ✦ File: src/Hackage\Security\Client\Repository\HttpLib\HttpClient.hs | ||
# | ||
# 109 ┃ | ||
# 110 ┃ rangeHeader = BS.C8.pack $ "bytes=" ++ show from ++ "-" ++ show (to - 1) | ||
# 111 ┃ ^^^^^^^^^^ | ||
|
||
# Data types with non-strict fields | ||
# Defining lazy fields in data types can lead to unexpected space leaks | ||
# Pantry uses lazy fields in many places | ||
[[check]] | ||
id = "STAN-0206" | ||
scope = "all" | ||
type = "Exclude" | ||
|
||
# Anti-pattern: Slow 'length' for Text | ||
[[ignore]] | ||
id = "OBS-STAN-0208-gkCCTP-1100:14" | ||
# ✦ Description: Usage of 'length' for 'Text' that runs in linear time | ||
# ✦ Category: #AntiPattern | ||
# ✦ File: src/Pantry.hs | ||
# | ||
# 1099 ┃ | ||
# 1100 ┃ isSHA1 t = T.length t == 40 && T.all isHexDigit t | ||
# 1101 ┃ ^^^^^^^^ | ||
|
||
# Anti-pattern: Pattern matching on '_' | ||
# Pattern matching on '_' for sum types can create maintainability issues | ||
# Pantry uses pattern matching on '_' in many places. | ||
[[check]] | ||
id = "STAN-0213" | ||
scope = "all" | ||
type = "Exclude" | ||
|
||
# Big tuples | ||
# Using tuples of big size (>= 4) can decrease code readability | ||
# In serveral places Pantry uses 4-tuples. | ||
[[check]] | ||
id = "STAN-0302" | ||
scope = "all" | ||
type = "Exclude" |