Skip to content

pre-commit hook is failing locally and on CI #3170

Closed
@andys8

Description

@andys8

All open pull requests have a failing CI job because "pre-commit" will result in errors.

image

Solving the root cause or if not possible disabling the job for now would be great in order to avoid confusion (especially for new contributors)

Steps to reproduce

Run CI, open a PR

Example: https://github.com/haskell/haskell-language-server/actions/runs/3060016524/jobs/4938045479

Reasons

Stylish Haskell fails to parse some files

See #3131 and #3171

CI
ghcide/src/Development/IDE/GHC/Compat/Plugins.hs: <string>:53:3: error:
    parse error (possibly incorrect indentation or mismatched brackets)
ghcide/src/Development/IDE/GHC/Compat/Env.hs: <string>:101:1: error: parse error on input `import'
Locally (stylish-haskell 0.14.2.0)
ghcide/src/Development/IDE/GHC/Compat/Plugins.hs: <string>:53:3: error:
    parse error (possibly incorrect indentation or mismatched brackets)
plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction/ExactPrint.hs: <string>:7:1: error: parse error on input `#'
ghcide/src/Development/IDE/GHC/Compat/Env.hs: <string>:101:1: error: parse error on input `import'
plugins/hls-refactor-plugin/src/Development/IDE/GHC/Compat/ExactPrint.hs: <string>:5:1: error: parse error on input `#'
plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction.hs: <string>:90:1: error: parse error on input `#'

Some files are not formatted

Fixed with #3171

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triagetype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions