Skip to content

Commit 6023c2c

Browse files
Some maintenance updates (#62)
* Move test-specific rebar.config options to the test profile * Trim .gitignore to bare requirements for a rebar3 project * Update some CI versions * Tweak dialyzer options * underspecs allows for stricts typespecs, which is good * no_return prevents a class of warnings we might want to be aware of * Analyse it with XRef * markdownlint it! * YAMLlint it! * Prefer ex_doc to EDoc Also adds a much-deserved badge to README.md * Analyse further We also add `no_unknown` to Dialyzer (because `unknown` is default in OTP 26), so we can fix errors locally without having to wait for CI (if locally you're using OTP 25, and CI fails in OTP 26, that is) * Fix as per CI: Warning: ... is undefined function (Xref)
1 parent edf814f commit 6023c2c

18 files changed

+161
-105
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@ about: Create a report to help us improve
44
title: ''
55
labels: bug
66
assignees: ''
7-
87
---
98

109
## Bug Description
10+
1111
A clear and concise description of what the bug is.
1212

1313
## To Reproduce
14+
1415
Steps to reproduce the behavior
1516

1617
## Expected Behavior
18+
1719
A clear and concise description of what you expected to happen.
1820

1921
## `rebar3` Logs
22+
2023
If applicable, run `rebar3` with `DIAGNOSTIC=1` and attach all the logs to your report.
2124

2225
## Additional Context
23-
- OS: [e.g. MacOS]
24-
- Erlang version
25-
- rebar3 version
26+
27+
- OS: [e.g. MacOS]
28+
- Erlang version
29+
- rebar3 version

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,20 @@ about: Suggest an idea for this project
44
title: ''
55
labels: enhancement
66
assignees: ''
7-
87
---
98

10-
## Is your feature request related to a problem? Please describe.
9+
## Is your feature request related to a problem? Please describe
10+
1111
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1212

1313
## Describe the solution you'd like
14+
1415
A clear and concise description of what you want to happen.
1516

1617
## Describe alternatives you've considered
18+
1719
A clear and concise description of any alternative solutions or features you've considered.
1820

1921
## Additional Context
22+
2023
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/other-issues.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Something that's not covered by the other categories
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
<!-- Please consider opening a discussion if this is not really an issue -->

.github/workflows/erlang.yml

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
---
12
name: Erlang CI
23

3-
on: [push, pull_request]
4+
"on": [push, pull_request]
45

56
env:
67
ERL_FLAGS: "-enable-feature all"
@@ -9,33 +10,41 @@ jobs:
910

1011
build:
1112

12-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-22.04
1314

1415
strategy:
1516
matrix:
16-
otp: ['25.2.1']
17-
rebar: ['3.20.0']
17+
otp: ["25", "26"]
18+
rebar: ["3.22"]
1819

1920
steps:
20-
- uses: actions/checkout@v2
21-
- uses: erlef/setup-beam@v1
22-
id: setup-beam
23-
with:
24-
otp-version: ${{matrix.otp}}
25-
rebar3-version: ${{matrix.rebar}}
26-
- name: Restore _build
27-
uses: actions/cache@v2
28-
with:
29-
path: _build
30-
key: _build-cache-for-os-${{runner.os}}-otp-${{steps.setup-beam.outputs.otp-version}}-rebar3-${{steps.setup-beam.outputs.rebar3-version}}-hash-${{hashFiles('rebar.lock')}}
31-
- name: Restore rebar3's cache
32-
uses: actions/cache@v2
33-
with:
34-
path: ~/.cache/rebar3
35-
key: rebar3-cache-for-os-${{runner.os}}-otp-${{steps.setup-beam.outputs.otp-version}}-rebar3-${{steps.setup-beam.outputs.rebar3-version}}-hash-${{hashFiles('rebar.lock')}}
36-
- name: Compile
37-
run: rebar3 compile
38-
- name: Format check
39-
run: rebar3 format --verify
40-
- name: Run tests and verifications
41-
run: rebar3 test
21+
- uses: actions/checkout@v3
22+
- uses: erlef/setup-beam@v1
23+
id: setup-beam
24+
with:
25+
otp-version: ${{matrix.otp}}
26+
rebar3-version: ${{matrix.rebar}}
27+
- name: Restore _build
28+
uses: actions/cache@v3
29+
with:
30+
path: _build
31+
key: "_build-cache-for
32+
-os-${{runner.os}}
33+
-otp-${{steps.setup-beam.outputs.otp-version}}
34+
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}
35+
-hash-${{hashFiles('rebar.lock')}}"
36+
- name: Restore rebar3's cache
37+
uses: actions/cache@v3
38+
with:
39+
path: ~/.cache/rebar3
40+
key: "rebar3-cache-for
41+
-os-${{runner.os}}
42+
-otp-${{steps.setup-beam.outputs.otp-version}}
43+
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}
44+
-hash-${{hashFiles('rebar.lock')}}"
45+
- name: Compile
46+
run: rebar3 compile
47+
- name: Format check
48+
run: rebar3 format --verify
49+
- name: Run tests and verifications
50+
run: rebar3 as test test

.github/workflows/lint.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Lint
3+
4+
"on": [push, pull_request]
5+
6+
jobs:
7+
lint:
8+
name: Lint
9+
10+
runs-on: ubuntu-22.04
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
# uses .markdownlint.yml for configuration
16+
- name: markdownlint
17+
uses: DavidAnson/markdownlint-cli2-action@v11
18+
with:
19+
globs: |
20+
.github/**/*.md
21+
*.md
22+
23+
- name: yamllint
24+
uses: ibiqlik/action-yamllint@v3
25+
with:
26+
file_or_dir: |
27+
.github/**/*.yml
28+
.*.yml
29+
strict: true
30+
config_file: .yamllint.yml

.gitignore

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
rebar3.crashdump
22
.rebar3
33
_*
4-
.eunit
5-
*.o
6-
*.beam
7-
*.plt
84
erl_crash.dump
9-
.concrete/DEV_MODE
10-
11-
.rebar
12-
rel/
13-
ebin/
14-
15-
_build
16-
_checkouts
175
doc/
18-
rebar3

.markdownlint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
default: true
3+
MD013:
4+
line_length: 100

.yamllint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
extends: default
3+
rules:
4+
line-length:
5+
max: 100

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
# Changelog
2+
13
See the [Releases](../../releases) page.

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at [email protected]. All
58+
reported by contacting the project team at <[email protected]>. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.
@@ -67,10 +67,10 @@ members of the project's leadership.
6767

6868
## Attribution
6969

70-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
71+
version 1.4, available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
7272

7373
[homepage]: https://www.contributor-covenant.org
7474

7575
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
76+
<https://www.contributor-covenant.org/faq>

0 commit comments

Comments
 (0)