Skip to content

Commit

Permalink
Merge pull request #82 from sile/fix-rebar3-help-efmt-error
Browse files Browse the repository at this point in the history
Fix a bug that causes an error when `$ rebar3 help efmt` is executed
  • Loading branch information
sile authored Sep 16, 2022
2 parents a5fe686 + 0b0a3da commit a0298fb
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,13 @@ jobs:
with:
command: clippy
args: --all -- -D warnings

plugin-test:
name: rebar3 plugin test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rebar3 help efmt
working-directory: rebar3_efmt/test/foo
- run: rebar3 efmt -w
working-directory: rebar3_efmt/test/foo
2 changes: 1 addition & 1 deletion rebar3_efmt/src/rebar3_efmt_prv.erl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ opts() ->
"(note that files spcified by `.gitignore` will be ignored)"},
{disable_update_check, undefined, "disable-update-check", undefined,
"Stops issuing an HTTP GET request each command execution to check if a newer version has been released"},
{allow_partial_failure, "allow-partial-failure", undefined,
{allow_partial_failure, undefined, "allow-partial-failure", undefined,
"Don't raise an error even if the input contains wrong Erlang code."
"`efmt` tries to continue formatting the remaining part of the code as much as possible"}
].
Expand Down
19 changes: 19 additions & 0 deletions rebar3_efmt/test/foo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.rebar3
_*
.eunit
*.o
*.beam
*.plt
*.swp
*.swo
.erlang.cookie
ebin
log
erl_crash.dump
.rebar
logs
_build
.idea
*.iml
rebar3.crashdump
*~
1 change: 1 addition & 0 deletions rebar3_efmt/test/foo/_checkouts/rebar3_efmt
3 changes: 3 additions & 0 deletions rebar3_efmt/test/foo/rebar.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{erl_opts, [debug_info]}.
{project_plugins, [rebar3_efmt]}.
{deps, []}.
14 changes: 14 additions & 0 deletions rebar3_efmt/test/foo/src/foo.app.src
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{application, foo,
[{description, "An OTP library"},
{vsn, "0.1.0"},
{registered, []},
{applications,
[kernel,
stdlib
]},
{env,[]},
{modules, []},

{licenses, ["Apache 2.0"]},
{links, []}
]}.
3 changes: 3 additions & 0 deletions rebar3_efmt/test/foo/src/foo.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-module(foo).

-export([]).

0 comments on commit a0298fb

Please sign in to comment.