Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

[CDEC-383] Add stylish-haskell to nix and CI #3142

Merged
merged 3 commits into from
Jun 27, 2018
Merged

Conversation

ruhatch
Copy link
Contributor

@ruhatch ruhatch commented Jun 26, 2018

Description

To bring the code base to a consistent style we want to add stylish-haskell checks to CI. This adds our custom version of stylish-haskell to stack.yaml and uses it in the stylish-haskell check in buildkite.

Linked issue

CDEC-383

Type of change

  • [~] 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🛠 New feature (non-breaking change which adds functionality)
  • [~] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
  • [~] 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
  • [~] 🔨 New or improved tests for existing code
  • [~] ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

  • I have read the style guide document, and my code follows the code style of this project.
  • If my code deals with exceptions, it follows the guidelines.
  • I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.

Testing checklist

  • [~] I have added tests to cover my changes.
  • All new and existing tests passed.

QA Steps

Screenshots (if available)

Copy link
Contributor

@parsonsmatt parsonsmatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

erikd
erikd previously requested changes Jun 26, 2018
@@ -198,7 +198,7 @@ steps:
# Note: we tend to write code which fits into 80 characters, in some cases
# 100 is acceptable. For imports we always permit 100 characters because it
# decreases verbosity of diffs and makes merging easier.
columns: 100
columns: 80
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't think we should change that one. 80 characters is super narrow and the change is actually un-ncessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, 80 chars is the codebase-wide recommended style - it's only here that it was inconsistent. What does everyone else think?

@erikd erikd merged commit 2173041 into develop Jun 27, 2018
@erikd erikd deleted the ruhatch/CDEC-383 branch June 27, 2018 02:28
@adinapoli-iohk
Copy link
Contributor

@ruhatch Which version of stylish-haskell are you using? After this patch, even if I upgrade stylish-haskell to 0.9.2.0, I get the following when trying to style my code:


stylish-haskell: Language.Haskell.Stylish.Config.loadConfig: Error in $: Unknown option: with_module_name, should be one of: new_line, with_alias, after_alias^@CallStack (from HasCallStack):^
@  error, called at lib/Language/Haskell/Stylish/Config.hs:107:25 in stylish-haskell-0.9.2.0-LNY14uUlu9HBLMLNzIHZYc:Language.Haskell.Stylish.Config^@

@adinapoli-iohk
Copy link
Contributor

adinapoli-iohk commented Jun 27, 2018

Oh wow, didn't appreciate I needed to install our own custom version:

haskell/stylish-haskell#214

Alfredo proceeds to checkout and install the version

@parsonsmatt
Copy link
Contributor

You can just do stack install stylish-haskell in the cardano-sl repo and it will pick up the right version, thanks to it being in the stack.yaml file.

@adinapoli-iohk
Copy link
Contributor

You can just do stack install stylish-haskell in the cardano-sl repo and it will pick up the right version, thanks to it being in the stack.yaml file.

Ah, true enough!

KtorZ pushed a commit that referenced this pull request Nov 9, 2018
[CDEC-383] Add stylish-haskell to nix and CI
KtorZ pushed a commit to input-output-hk/cardano-wallet-legacy that referenced this pull request Nov 9, 2018
…hk/ruhatch/CDEC-383

[CDEC-383] Add stylish-haskell to nix and CI
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants