Skip to content

Commit a98d0bc

Browse files
author
Ishmum Jawad Khan
committed
Merge branch 'master' into bug-fix/pragma-before-shebang
2 parents 833c6a8 + 9d21805 commit a98d0bc

File tree

203 files changed

+5640
-4291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+5640
-4291
lines changed

.github/mergify.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ pull_request_rules:
77
conditions:
88
- status-success=bench-example (8.10.4, ubuntu-latest, Cabal-3.0.0.0)
99
- status-success=bench-example (8.10.4, ubuntu-latest, lsp-types-1.0.0.1)
10+
# disabled (too slow, ~4h) until hie-bios >0.7.2 is released
11+
# - status-success=bench-example (8.10.4, ubuntu-latest, bench_example_HLS)
1012

1113
- status-success=nix (default, ubuntu-latest)
1214
- status-success=nix (default, macOS-latest)

.github/workflows/bench.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212
os: [ubuntu-latest]
1313

1414
steps:
15+
# Cancel queued workflows from earlier commits in this branch
16+
- uses: fkirc/skip-duplicate-actions@master
17+
1518
- uses: actions/checkout@v2
1619
- run: git fetch origin master # check the master branch for benchmarking
1720
- uses: haskell/actions/setup@v1
@@ -78,9 +81,12 @@ jobs:
7881
matrix:
7982
ghc: ['8.10.4']
8083
os: [ubuntu-latest]
81-
example: ['Cabal-3.0.0.0', 'lsp-types-1.0.0.1']
84+
example: ['Cabal-3.0.0.0', 'lsp-types-1.0.0.1', 'bench_example_HLS']
8285

8386
steps:
87+
# Cancel queued workflows from earlier commits in this branch
88+
- uses: fkirc/skip-duplicate-actions@master
89+
8490
- uses: haskell/actions/setup@v1
8591
with:
8692
ghc-version: ${{ matrix.ghc }}
@@ -121,6 +127,13 @@ jobs:
121127
ghcide/bench-results/results.*
122128
ghcide/bench-results/**/*.csv
123129
ghcide/bench-results/**/*.svg
124-
ghcide/bench-results/**/*.eventlog
125130
ghcide/bench-results/**/*.eventlog.html
131+
132+
- name: Archive benchmark logs
133+
uses: actions/upload-artifact@v2
134+
with:
135+
name: bench-logs-${{ runner.os }}-${{ matrix.ghc }}
136+
path: |
137+
ghcide/bench-results/**/*.log
138+
ghcide/bench-results/**/*.eventlog
126139
ghcide/bench-results/**/*.hp

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ test/testdata/**/hie.yaml
3030

3131
# shake build folder (used in benchmark suite)
3232
.shake/
33+
34+
# pre-commit-hook.nix
35+
.pre-commit-config.yaml

.stylish-haskell.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# See https://github.com/jaspervdj/stylish-haskell/blob/main/data/stylish-haskell.yaml
2+
# for reference.
3+
4+
steps:
5+
# - unicode_syntax:
6+
# add_language_pragma: true
7+
8+
# - module_header:
9+
# indent: 4
10+
# sort: true
11+
# separate_lists: true
12+
13+
# - records:
14+
# equals: "indent 2"
15+
# first_field: "indent 2"
16+
# field_comment: 2
17+
# deriving: 2
18+
# via: "indent 2"
19+
# sort_deriving: true
20+
# break_enums: false
21+
# break_single_constructors: true
22+
# curried_context: false
23+
24+
- simple_align:
25+
cases: always
26+
top_level_patterns: always
27+
records: always
28+
multi_way_if: always
29+
30+
- imports:
31+
align: global
32+
list_align: after_alias
33+
pad_module_names: true
34+
long_list_align: inline
35+
empty_list_align: inherit
36+
list_padding: 4
37+
separate_lists: true
38+
space_surround: false
39+
ghc_lib_parser: false
40+
41+
- language_pragmas:
42+
style: vertical
43+
align: true
44+
remove_redundant: true
45+
language_prefix: LANGUAGE
46+
47+
# - tabs:
48+
# spaces: 8
49+
50+
- trailing_whitespace: {}
51+
52+
# - squash: {}
53+
54+
columns: 80
55+
56+
newline: native
57+
58+
language_extensions:
59+
- BangPatterns
60+
- DataKinds
61+
- DeriveFunctor
62+
- DeriveGeneric
63+
- FlexibleContexts
64+
- GeneralizedNewtypeDeriving
65+
- KindSignatures
66+
- LambdaCase
67+
- NamedFieldPuns
68+
- OverloadedStrings
69+
- RecordWildCards
70+
- ScopedTypeVariables
71+
- StandaloneDeriving
72+
- TupleSections
73+
- TypeApplications
74+
- TypeOperators
75+
- ViewPatterns
76+
77+
cabal: true

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# Contributors Guide
22

3+
## Pre-commit hook
4+
We are using [pre-commit-hook.nix](https://github.com/cachix/pre-commit-hooks.nix) to configure git pre-commit hook for formatting. Although it is possible to run formatting manually, we recommend you to use it to set pre-commit hook as our CI checks pre-commit hook is applied or not.
5+
6+
You can configure the pre-commit-hook by running
7+
8+
``` bash
9+
nix-shell
10+
```
11+
12+
If you don't want to use [nix](https://nixos.org/guides/install-nix.html), you can instead use [pre-commit](https://pre-commit.com) with the following config.
13+
14+
```json
15+
{
16+
"repos": [
17+
{
18+
"hooks": [
19+
{
20+
"entry": "stylish-haskell --inplace",
21+
"exclude": "(test/testdata/.*|hie-compat/.*)",
22+
"files": "\\.l?hs$",
23+
"id": "stylish-haskell",
24+
"language": "system",
25+
"name": "stylish-haskell",
26+
"pass_filenames": true,
27+
"types": [
28+
"file"
29+
]
30+
}
31+
],
32+
"repo": "local"
33+
}
34+
]
35+
}
36+
```
37+
338
## Testing
439

540
The tests make use of the [Tasty](https://github.com/feuerbach/tasty) test framework.

0 commit comments

Comments
 (0)