ndmitchell / ndmitchell/hlint

Uncought redundant brackets

Open
#113 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
1.6k
Forks
210
PR merge metrics
No merged PRs in 30d

Description

makeHappy :: Int -> Int
makeHappy x = sum $ map ((^ 2) . digitToInt) (show x)

isHappy :: Int -> Bool
isHappy x = isHappy' x []
  where
    isHappy' :: Int -> [Int] -> Bool
    isHappy' 1 _  = True
    isHappy' x xs =
      let
        maybeHappy = makeHappy x
      in
        (maybeHappy `notElem` xs && isHappy' maybeHappy (maybeHappy : xs))

Notice redundant brackets in the last line.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no file, test, or entry point. Start by locating the rule that reports redundant brackets and compare it with the Haskell example shown; done means the example is handled with an appropriate suggestion and coverage for the case.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.